- logical comparison
- operator precedence
- Js break continue
- with void statement
- reserved keywords
- HTML DOM Nodes
- document object
- write document
- DOM node properties
- jscript create nodes
- jScript dom attribute
- window open/close
- Window Object
- window print method
you can place an unlimited number of scripts in an html doucment.
the HTML <script> element
the html <script> element is used to embed or reference an executable script within an html or xhtml document.
<script> //java scripting code put here </script>
you may also use a meta tag in the head of the document to specify a default scripting language for the entire page.
example :put script code in the head and body section.
to use an external script, point to the .js file in the "src" attribute of the <script> tag:
putting all the scripts used in a site in a common script directory similar to how images are stored in an images directory.this will ensure proper caching, keep scripts separated from content, and start a library of common code for use in a site.
the <noscript> tag support in all major browser.it most important use is provide content for people accessing the web page with a browser that either does not support client side scripting or that has had its script support disabled by the user, perhaps for security reasons.you can put html code inside noscript tag look like-
XHTML rules are much stricter than those of HTML.When special XML characters (such as & and < >) are used in scripts in XHTML files, they cause errors. The simplest workaround is to use external script files. However, if you simply must write inline scripts, then you will need to include CDATA (character data) sections in your file. Within CDATA sections the special XML characters can be used freely. The following example uses a CDATA section that is compatible with both XHTML and HTML syntax. Note that XHTML also requires the use of the �type� attribute.