MyTetra Share
Делитесь знаниями!
external file
Время создания: 13.05.2017 23:31
Раздел: javaScript - javaScript Tutorial - files
Запись: xintrea/mytetra_db_mcold/master/base/1494707486607sb51bmw/text.html на

      <script type="text/javascript" src="filename.js" ></script>

To use JavaScript from an external file source, you need to write all your JavaScript source code in a simple text file with the extension ".js" and then include that file as shown above.

For example, you can keep the following content in filename.js file and then you can use sayHello function in your HTML file after including the filename.js file.

function sayHello() {
   alert("Hello World")
MyTetra Share v.0.60
Яндекс индекс цитирования