慕雪9588076
2017-10-06 11:20
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Math </title>
<script type="text/javascript">
var a = (Math.round())*10;
document.write(Math.round(a));
</script>
</head>
<body>
</body>
</html>
var a = Math.random()*10;
把var a = (Math.round())*10;改为:var a = (Math.random())*10;
"var a = (Math.round())*10;"随机函数代码生成为Math.random()
JavaScript进阶篇
468194 学习 · 21891 问题
相似问题