13.2.3 Script Type
Older browsers used a language attribute on the
The language attribute is deprecated and should no longer be used.
When a web browser encounters aelement with a type attribute whose value it does not recognize, it parses the element but does not attempt to display or execute that content. This means that you can use theelement to embed arbitrary textual data into your document: just use the typeattribute to specify a non-executable type for your data. To retrieve the data, you can use the text property of the HTMLElement object that represents the script element ( Chapter 15 explains how to obtain these elements). Note, however, that this data embedding technique only works for inline scripts. If you specify a src attribute and an unknown type, the script will be ignored and nothing will be downloaded from the URL you specified.欢迎转载,转载请注明来自一手册:http://yishouce.com/book/1/31411.html