使用 加载js

<html>
<head>
< >  of Document</ >
< >

// All Your   Code goes In Here Between the opening and closing   tags.
</ >

</head>
<body>
The content of
your page here.

</body>
</html>

 

html head头部加载js

<html>
<head>

< >
alert(\"Do you see the page heading?\");
</ >
</head>
<body>
<h1>Page heading</h1>
</body>
</html>

 

html body加载js

<html>
<head>
</head>
<body>
<h1>Page heading</h1>
< >
alert(\"Do you see the page heading?\");
</ >
</body>
</html>

 

html载入外部js文件

<html>
<head>
< >  of Document</ >
<  src=\"path-to-file/fileName.js\"></ >
</head>
<body>
The content of
your page goes here.
</body>
</html>

 

混合加载js

<html>
<head>
< >A Simple Page</ >
<  language=\" \">
<!--

//  -->
</ >
</head>
<body>
<p  =\"units = prompt(\'How many do you want\',\'Enter quantity\');alert(\'Cost per unit is $9.99, therefore total cost for \' + units + \' is \' + units * 9.99);\">Click here to specify quantity</p>
</body>
</html>
收藏 打印