How to run javascript script: first create a new text document, open the document and enter the js script; then click on the file and save as; then change the file type to "all files"; finally execute the js script in the browser.
The operating environment of this tutorial: Windows 7 system, JavaScript version 1.8.5, DELL G3 computer.
How to run javascript script:
1. Right-click | [New] | [Text Document].
#2. Double-click to open the text document and enter the following js script. The function of this script is to make the browser pop up the "I Love You China" dialog box.
3. Click [File] | [Save As].
4. Select the file saving directory, modify the file name to "xxx.html", modify the file type to "all files", and modify the encoding to "UTF-8" to prevent Chinese garbled.
5. Double-click "xxx.html" to execute the js script in the browser.
Related free learning recommendations: javascript video tutorial
##
The above is the detailed content of How to run javascript script. For more information, please follow other related articles on the PHP Chinese website!