怎么实现生成一个随机整数?
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Math </title>
<script type="text/javascript">
var x;
x = document.write(Math.random());
document.write(Math.round(x));
</script>
</head>
<body>
</body>
</html>