js.rst
author Oleksandr Gavenko <gavenkoa@gmail.com>
Fri, 13 Jul 2012 22:32:19 +0300
changeset 1334 9bf0d5a1f0cf
parent 899 7b4265c8d324
permissions -rw-r--r--
Include common header with quick links.

-*- mode: outline; coding: utf-8; -*-

* HTML.

<noscript> tag used to render HTML if JavaScript disabled in browser.

** Include in HTML.

  <html>
    <head>
      <script type="text/javascript" src="abc.js"></script>
    </head>
   ...
  <html>

** Inline in HTML.

  <html>
    <h1>Hello!<h1/>
    <script language="javascript">
      <!--
      alert("Hello!")
      document.write("sin(10) = " + Math.sin(10))
      //-->
    </script>
  </html>

* Reduce js code size.

  http://crockford.com/javascript/jsmin
                The JavaScript Minifier
  http://developer.yahoo.com/yui/compressor/
                YUI Compressor

* XML processing from js.

** XML for <SCRIPT>.

Powerful, standards-compliant JavaScript XML parser that is designed to help web application
designers implement cross platform applications that take advantage of client-side manipulation of
XML data. XML for <SCRIPT> provides a full suite of tools, including:

 * A standards-compliant W3C DOM Level 2 processor
 * An XPath processor
 * A standards-compliant SAX processor
 * A simple (classic) DOM processor
 * Proxies for XML retrieval from any domain
 * Utilities for XML and application development

  http://xmljs.sourceforge.net/
                home page