|
1 .. -*- coding: utf-8; -*- |
|
2 .. include:: HEADER.rst |
|
3 |
|
4 ============= |
|
5 JavaScript. |
|
6 ============= |
|
7 .. contents :: |
|
8 |
|
9 HTML. |
|
10 ===== |
|
11 |
|
12 <noscript> tag used to render HTML if JavaScript disabled in browser. |
|
13 |
|
14 Including JavaScript in HTML page. |
|
15 ================================== |
|
16 :: |
|
17 |
|
18 <html> |
|
19 <head> |
|
20 <script type="text/javascript" src="abc.js"></script> |
|
21 </head> |
|
22 ... |
|
23 <html> |
|
24 |
|
25 Inlining JavaScript in HTML code. |
|
26 ================================= |
|
27 :: |
|
28 |
|
29 <html> |
|
30 <h1>Hello!<h1/> |
|
31 <script language="javascript"> |
|
32 <!-- |
|
33 alert("Hello!") |
|
34 document.write("sin(10) = " + Math.sin(10)) |
|
35 //--> |
|
36 </script> |
|
37 </html> |
|
38 |
|
39 Reduce js code size. |
|
40 ==================== |
|
41 |
|
42 http://crockford.com/javascript/jsmin |
|
43 The JavaScript Minifier |
|
44 http://developer.yahoo.com/yui/compressor/ |
|
45 YUI Compressor |
|
46 |
|
47 JavaScript versions. |
|
48 ==================== |
|
49 |
|
50 JavaScript 1.5 was introduced back in 1999. |
|
51 |
|
52 https://developer.mozilla.org/en-US/docs/JavaScript/Reference#JavaScript.2FBrowser_support_history |
|
53 List of versions with CHANGES. |
|
54 http://en.wikipedia.org/wiki/Javascript#Versions |
|
55 List of versions per browser. |
|
56 http://en.wikipedia.org/wiki/ECMAScript#Version_correspondence |
|
57 List of versions. |
|
58 |
|
59 XML from JavaScript. |
|
60 ==================== |
|
61 |
|
62 Powerful, standards-compliant JavaScript XML parser that is designed to help web application |
|
63 designers implement cross platform applications that take advantage of client-side manipulation of |
|
64 XML data. XML for <SCRIPT> provides a full suite of tools, including: |
|
65 |
|
66 * A standards-compliant W3C DOM Level 2 processor |
|
67 * An XPath processor |
|
68 * A standards-compliant SAX processor |
|
69 * A simple (classic) DOM processor |
|
70 * Proxies for XML retrieval from any domain |
|
71 * Utilities for XML and application development |
|
72 |
|
73 http://xmljs.sourceforge.net/ |
|
74 home page |
|
75 |