"."/> ".">
Home >Web Front-end >Front-end Q&A >How to call javascript files in HTML
In HTML, you can use the src attribute of the script tag to call the javascript file. This attribute specifies the URL of the external script file. The syntax format is "6fe72667dc91a8b20b2098e5c999b5c0a68d868d53d9de6b7fe16b14d7e8e543 tag is used to define client-side scripts, such as JavaScript. The
3f1c4e4b6b16bbbd69b2ee476dc4f83a element can either contain script statements or point to an external script file through the "src" attribute.
Example:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> </head> <body> <script src="demo_script_src.js" > </script> </body> </html>Output:
这个输出的内容来自 JavaScript 外部文件。[Related recommendations: javascript learning tutorial]
The above is the detailed content of How to call javascript files in HTML. For more information, please follow other related articles on the PHP Chinese website!