问答详情
源自:7-16 随机数 random()

我这么写,为啥不出结果

<!DOCTYPE html>

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Math </title>

<script type="text/javascript">

    var mynum = Math.random()*10);

    document.write(Math.round(mynum));

</script>

</head>

<body>

</body>

</html>

Math

提问者:慕仔2455976 2018-04-23 11:28

个回答

  • 春林初盛_
    2018-04-23 11:37:29

    var mynum = Math.random()*10);把这行最后那个)去掉试试