This article is Almost Ready.
W3C Candidate Recommendation
- Document Object Model (DOM) Level 2 HTML Specification, Section 1.6.5.
- HTML 4.01 Specification, Section 18.2.1.
- HTML 5 Specification, Section 4.3.
The script object has these properties.
|Property||Description||Used with inline scripts|
|src||Retrieves the URL to an external file that contains the source code or data.||No|
|type||Sets or retrieves the MIME type for the script, the default is
|charset||Sets or retrieves the script's character encoding. You can't use the type attribute with this attribute.||No|
|language||Sets or retrieves the programming language for the associated scripting engine. Depracated, use type instead.||Yes|
|defer||Sets or retrieves the whether or not the script will be loaded asynchronously and executed synchronously.||No|
|async||Sets or retrieves the whether or not the script will be loaded asynchronously and executed asynchronously.||No|
|crossorigin||Sets or retrieves the whether or not script error information will be revealed from the script(This is used only when scripts are being loaded from different origins).||No|
Loading an external script.
Writing an inline script.
Code within the script block that is not contained within a function is executed immediately as the document is loaded.When the Type attribute is unset on the script object, then
async="async" didn't work in some older browser, instead
async="true" was used.
|Feature||Chrome||Firefox (Gecko)||Internet Explorer||Opera||Safari|
|Basic Support||1.0||1.0||Supported (when?)|| Supported (when?)
|Feature||Android||BlackBerry||Chrome for mobile||Firefox Mobile (Gecko)||IE Mobile||Opera Mobile||Opera Mini||Safari Mobile|
|Basic Support||1.0(probably)||Supported (when?)||1.0||1.0||Supported (when?)||1.0||1.0||1.0|
Related pages (MSDN)
XML Data Islands
This article contains content originally from external sources.
Portions of this content come from the Microsoft Developer Network: [Windows Internet Explorer API reference Article]