第一种编写方法:
<html>
<head>
<title>我的第一张网页</title>
</head>
<body>
<script>
document.write("你好!世界欢迎你!")
</script>
</body>
</html>
第二种编写方法:
<html>
<head>
<title>我的第二张网页</title>
<script>
function check(){
alert("你好!世界欢迎你!")
}
</script>
</head>
<body onload=check()>
</body>
</html>
第三种编写方法:
(1).txt中的文件
<html>
<head>
<title>我的第三张网页</title>
</head>
<body>
<script src="(3).js">
</script>
</body>
</html>
(2).js中的文件
document.write("你好!"+"<br>"+"世界欢迎你!");
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请
点击举报。