How to run the javascript script: first enter the js script in the text, click Save As of the file; then select the file saving directory, modify the file type to "All Files", and modify the encoding to "UTF-8" to prevent Chinese Garbled characters; finally double-click "xxx.html" to 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!