". The file name here can be arbitrarily specified with a suffix and changed to something else. The suffix name can also be used normally in js files."/> ". The file name here can be arbitrarily specified with a suffix and changed to something else. The suffix name can also be used normally in js files.">

Home  >  Article  >  Web Front-end  >  What is the JavaScript suffix?

What is the JavaScript suffix?

醉折花枝作酒筹
醉折花枝作酒筹Original
2021-06-10 16:01:494924browse

In JavaScript, the suffix is ​​usually ".js", but not necessarily "" in dynamic websites. The file name here can be arbitrarily specified with a suffix. If you change it to another suffix, you can also use js normally. document.

What is the JavaScript suffix?

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

In fact, this file with the extension .js is a javascript file. Why should we use the format of 352b1442a1f39d4f49881b7e5087d9182cacc6d41bbb37262a98f745aa00fbf0 to call the file? In fact, we often use In the process of making a web page, if the js file is written into the web page, it is not conducive to our repeated modifications. If we need to modify the js file in the future, we can directly change the js file without changing the entire web page. Now everyone's website is generated Static HTML is a good choice if you want to modify thousands of static pages, whether it is to replace or to save website space.

It should be noted that our js file can only contain js syntax, not simple text.

On a dynamic website, it is not necessarily the case, a4a9b21332e487f37fb8628c37bca3662cacc6d41bbb37262a98f745aa00fbf0, the file name here can specify any suffix name.

For example:

aa.js can be changed to aa.gif and can be called normally

<script src="aa.gif"></script>

[Recommended learning: javascript advanced tutorial]

The above is the detailed content of What is the JavaScript suffix?. 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