<!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.random())*10);
var b=Math.round(a);
document.write(a);
document.write(b);
</script>
</head>
<body>
</body>
</html>
你两个输出中间少了间隔,数值在一起了看不出来