为什么有没有var结果都不变化? var可有可无么?
<script type="text/javascript">
var mynum =1;//mynum初值化数值为1
while (mynum<=5)
{
document.write("数字:"+mynum);
mynum=mynum+1;
}
</script>
<script type="text/javascript">
var mynum =1;//mynum初值化数值为1
while (mynum<=5)
{
document.write("数字:"+mynum);
mynum=mynum+1;
}
</script>
2016-07-28
举报