<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>do...while</title>
<script type="text/javascript">
var mynum =6;//mynum初值化数值为6
do
{
document.write("数字:"+mynum+"<br/>");
mynum=mynum-1;
}
while( mynun>0 )
</script>
</head>
<body>
</body>
</html>
把while里面的mynun改成mynum
你最后再while括号里面mynum写错了
while( mynun>0 )应该改为while(mynum>=1);
不是不循环是死循环 while( mynun<0 );