你这娃太粗心了去掉下面红色的就好了
<html>
<head>
<title> 脚本测试 </title>
<script language="javascript">
function Write_message()
{
var index-=0;
var text="开始学习脚本测试";
document.write(" <center> "+text+" </center> ");
}
</script>
</head> <body onload="Write_message()">
</body>
</html>
<html>
<head>
<title> 脚本测试 </title>
<script language="javascript">
function Write_message()
{
var index-=0;
var text="开始学习脚本测试";
document.write(" <center> "+text+" </center> ");
}
</script>
</head> <body onload="Write_message()">
</body>
</html>
解决方案 »
- 两个乒乓球队进行比赛问题 怎么用js来写
- js做后台
- 新手提问,请帮忙,很急。谢谢!
- 帮忙看看这个JavaScript提交表单的错误
- asp中如何无条件调用JAVASCRIPT函数
- 怎样用js向div中追加一些标记
- 怎样得到name值
- 怎么样使用一个提交框触发两个或者多个函数?
- 跨域能不能取到opener的属性?
- 如何动态改变span区域的样式?比如<span onmouseover="this.runtimeStyle.borderBottomColor='FF0000'">test</span>当鼠标移上时没有变化
- 小女子恳求好心人帮忙~显示动态下拉表单。。
- javascript中,toString方法是Object的方法还是Object.prototype的方法,为什么?给出你的理由。
不推荐在 onload 里面去 document.write
<html>
<head>
<title> 脚本测试 </title>
</head> <body>
<script language="javascript">
window.onload=function()
{
var text="开始学习脚本测试";
for(i=0;i<5;i++)
{
document.write(" <center> "+text+i+" </center> ");
}
}
</script>
</body>
</html>