What does script tag mean?

云罗郡主
Release: 2019-02-16 13:43:18
Original
12722 people have browsed it

What does the

script tag mean?

The script tag is used to define client-side scripts, such as JavaScript. The script element can contain script statements or point to external script files through the src attribute.

html script tag syntax

Function: used to define client-side scripts, such as JavaScript.

Note: The script element can either contain script statements or point to an external script file through the src attribute. The required type attribute specifies the MIME type of the script. Common applications of JavaScript are image manipulation, form validation, and dynamic content updates.

Note: If the code inside this element is not located in a function, then the code will be executed immediately when the page is loaded. Scripts following the tag will be ignored.

html script tag example

<html>
<body>
<script type="text/javascript">
document.write("<h1>Hello World!</h1>")
</script> 
</body>
</html>
</html>
Copy after login


The above is the detailed content of What does script tag mean?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template