JavaScript Advanced Programming (Third Edition) Chapter II using JavaScript in HTML

Source: Internet
Author: User

2.1 <script> Element <script> defines the following 6 properties:
    • Async: Optional. Indicates that the script should be downloaded immediately, but should not interfere with other actions on the page, such as downloading additional resources or waiting for other scripts to load. Valid only for external script files.
    • CharSet: Optional. Represents the character set of the code specified by the SRC attribute. Because most browsers ignore its value, this property is seldom used.
    • Defer: Optional. Indicates that the script can be deferred until the document is fully parsed and displayed before execution. Valid only for external script files. IE7 and earlier versions of this property are also supported for embedded scripting.
    • Language: Deprecated.
    • SRC: Optional. Represents the external file that contains the code to execute.
    • Type: Optional. Represents the content type of the scripting language in which the code is written.

The <script> element with the SRC attribute should not contain additional JavaScript code between its <script> and </script> tags. If embedded code is included, only the external script file is downloaded and executed, and the embedded code is ignored.

2.3 Document Mode

The first two document modes: Promiscuous mode and Standard mode

2.4<noscript> elements

<noscript> elements to display alternative content in browsers that do not support JavaScript

JavaScript Advanced Programming (Third Edition) Chapter II using JavaScript in HTML

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.