为什么我用while(mynum=0)的时候输出的是数字6,而不是输出6个数字。只有用while(mynum>0)才能输出6个数字。
<!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(mynum=0 )
</script>
</head>
<body>
</body>
</html>