中国职业拳击手:javascript问题

来源:百度文库 编辑:高考问答 时间:2024/04/28 06:35:11
<html>
<head><title>JavaScript示例件的</title>
</head>
<body>
<script language="JavaScript" type="text/javascript">
document.write("<body bgcolor='yellow' text="blue">");
document.write("这是直接迁入HTML的代码生成的行");
</script>
</body>
</html>
代码如上~但为什么网页上什么都不显示拉
浏览器版本是6。0的

<html>
<head><title>JavaScript示例件的</title>
</head>
<body bgcolor='yellow' text="blue">
这是直接迁入HTML的代码生成的行
</body>
</html>
不用js脚本可以显示;脚本一般用来做页面特效或者做用户的一些信息判断用的,为了减轻服务器的负担

你还可以做个CS样式来显示

<html>
<head><title>JavaScript问题解答</title>
</head>
<body bgcolor="yellow" text="blue">
<script language="JavaScript">
document.write("这是直接迁入HTML的代码生成的行");
</script>
</body>
</html>