请问什么情况下document写在for 循环里面呢?
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>for循环</title>
<script type="text/javascript">
var mymoney,sum=0;
for(mymoney=1;mymoney<=10;mymoney++)
{
sum=sum+mymoney;
document.write("sum合计:"+sum);
}
</script>
</head>
<body>
</body>
</html>