堕落无罪孩子是谁的:这段程序错在哪?VB
来源:百度文库 编辑:高校问答 时间:2024/05/30 19:41:20
<script language="vbscript">
do while i>0
document.write(i,' ')
i=i+1
loop
</script>
修改后的程序:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body>
<script language="vbscript">
i = -10
do while i>0
document.write(i,' ')
i=i+1
loop
</script>
</body>
</html>
可是还是说script error!
求教.
还有,loop既然是保留字,为什么在Dreamweawer中不粗体显示,我以前根本没有动过源码字体设置。
do while i>0
document.write(i,' ')
i=i+1
loop
</script>
修改后的程序:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body>
<script language="vbscript">
i = -10
do while i>0
document.write(i,' ')
i=i+1
loop
</script>
</body>
</html>
可是还是说script error!
求教.
还有,loop既然是保留字,为什么在Dreamweawer中不粗体显示,我以前根本没有动过源码字体设置。
do while 条件
程序块..
loop
// 当条件成立的时候(=True)才会执行里面的程序块
你的条件是:i>0
而在此之前并没有定义i,那么 i 的值就是 null ,null > 0 = false,所有就不会进入循环...
.
咱不懂asp编程,但能看懂!
你把I值转换为字符串看看!就在你的write里!
你的条件不对,将导致变量i无限+1,最终导致溢出错误。
<script language="vbscript">
i = 0
do while i>0
document.write(i,' ')
i=i+1
loop
</script>