JavaScript Tutorial – Part 1
Version: 32.2
Revision: 13 Build 21
JavaScript Tutorial – Part 1
Introduction: this tutorial will guide you to use “Script” codes in a formal fashion.
It will also help you to use “JavaScript” in a correct format.
————————————————–
<SCRIPT …> designates a script section of the page.
The contents of <SCRIPT …> are run using the scripting language set by the required “TYPE” attribute.
Example: the following <SCRIPT …> sets a short JavaScript, by far the most common scripting language.
<SCRIPT TYPE="text/javascript">
<!--
document.write("right now: " + new Date());
//-->
</SCRIPT>
The codes were wrapped in “JavaScript – Text” and it will not conflict with other source codes…
Notes: It is a popular but inaccurate belief that the LANGUAGE attribute is required for <SCRIPT …>. Furthermore, “LANGUAGE” has never been a required attribute and has not been the standard way to indicate scripting language for several years.
Important: <SCRIPT …> elements should always begin with <!– on the first line.
The last line should begin with the line-level comment string for the scripting language (// in JavaScript) followed by –>, as in the example above.
?>/images/ads_logo.jpg)
