JavaScript cannot be run alone. JavaScript is a scripting language that cannot be run independently like an exe program and can only be executed in the host environment. Two running methods: 1. Use the script tag to put the JavaScript code in HTML and run it with the help of the browser environment; 2. Run the JavaScript code with the help of the node.js environment.
The operating environment of this tutorial: windows7 system, javascript version 1.8.5, Dell G3 computer.
JavaScript is a cross-platform interpreted, dynamically typed, weakly typed, prototype-based scripting language. It cannot be run independently like an exe program and can only be executed in the host environment.
Running method 1: You need to use the script tag to put it in HTML and run it with the help of the browser environment.
Embedding JavaScript scripts in HTML pages requires the use of the
You can also put JavaScript code in a JavaScript script file. JavaScript script files are text files with the extension.js
and can be edited using any text editor. JavaScript files can then be imported into HTML pages using the