Home>Article>Web Front-end> What does src mean in javascript

What does src mean in javascript

醉折花枝作酒筹
醉折花枝作酒筹 Original
2021-07-16 11:48:51 13224browse

The src in JavaScript is: 1. Specify the attribute of the language in which the browser interprets the script code; 2. Specify the language in which the browser interprets the script code; 3. Specify the file where the script is located, and pass the content after src to Server; 4. Specify the size of the script.

What does src mean in javascript

The operating environment of this tutorial: windows7 system, javascript version 1.8.5, Dell G3 computer.

What is the role of the src attribute in JavaScript language?

Specify the properties of the language in which the browser interprets the script code, specify the language in which the browser interprets the script code, specify the file where the script is located, and specify the size of the script.

Specify the file where the script is located, which represents the js file you imported. However, this function is mainly for cross-domain or other purposes, mainly to pass the content behind your src to the server.

src is the abbreviation of the word source, indicating the source file path. Commonly used ones are

 /script>

JS files are not HTM files, so there cannot be HTML tags inside (except for the HTML tags included in the Output statement) .

Even though it is possible to use the 3f1c4e4b6b16bbbd69b2ee476dc4f83a tag in the JS file, since the JS file itself is called by the cf63513d015db02810a3e91eb1a17796 tag, this will become a duplicate tag, which is a negative for the snake drawing of supplement.

JS is a script file and consists of script code. Essentially, the normal 3f1c4e4b6b16bbbd69b2ee476dc4f83a and 2cacc6d41bbb37262a98f745aa00fbf0 tags between the lines of code are cut into a new file that is a JS file, and the filename is then put into the script's SRC attribute.

[Recommended learning:javascript advanced tutorial]

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

Statement:
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