Using JavaScript in HTML

Source: Internet
Author: User

JavaScript is a client-side scripting language that can help HTML implement some dynamic functionality.

Example

1. Loading a JavaScript file

<head>    <scripttype="text/javascript"src="dreamdu.js"></script></head>
2.script tags--using scripts in documents
    The
    • script tag appears in pairs, with <script> start with </script> End
    • Properties
      • src  --Specifies the address URI of the script file (for example: JS file) that needs to be loaded
      • type  --Specifies the media type (for example: Code>type= "Text/javascript" )
<head>    <scripttype="text/javascript"src="dreamdu.js"></script></head>

These two methods are also the same, it is recommended to use the first method

HTML NoScript Tags

NoScript tags--prompt text when scripts cannot be loaded
    • noscript tags are paired up to <noscript> start to </noscript> end
    • Citation URL: http://www.dreamdu.com/xhtml/tag_noscript/
Example
<noscript>此页面无法加载js脚本代码.</noscript>

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.