Fortune Telling Collection - Fortune-telling birth date - How to output js as html source code?
How to output js as html source code?
Js code comment: javascript code can be directly interpreted and executed on the client. There are two ways to call js code in html: one is to write javascript in html file and call js function in html; Second, the js code is written in a file, referenced in html, and the js function defined in the js file is used.
Calling method:
1. Open Dreamweaver software and select HTML under "Create New Project";
2. Click "File"-"Save As"-the file is named Test-and saved on the computer desktop;
3. Write an html file, which contains user name and password input text boxes, and confirm and cancel buttons;
4. Insert < script language="JavaScript ">Js code to call js function in html;
5.js code writing and html call js code to save tset.html file, open test.html file in browser, and check the execution effect of js code;
6. Create a new check.js file in Dreamweaver software (the method is the same as html file), and enter the check function in the check file;
7.test.html quotes the check.js file under the title tag;
8. Reference the js function in the check.js file in the program, refresh the test.hmtl file in the browser, but enter illegal characters in the user name input box to check the js code.
- Related articles
- What font is the word written by the fortune teller _ What font is the word written by the fortune teller?
- The sides of the eyeball are a little yellow. What does it have to do with the liver?
- Which domestic weather forecasting software is the most accurate?
- Beethoven's fortune telling _ Beethoven's ill-fated
- Leizhou Fortune Teller Dandan _ Leizhou Fortune Teller
- Dream of finding money and sharing it with friends.
- What does malice mean in fortune telling?
- Which issue of Taohuawu Zoe's fortune telling?
- The story of Dong Fangshuo.
- Jin Mu fire, water and soil five elements query table Wan Li Jin Mu fire, water and soil five elements query