<html >
<head>
<meta charset="utf-8">
<script src="test.js"></script>
<script type="text/javascript">
function try(){
var a = Math.round(Math.random()*10);
document.write(a);
if(a<6) {
alert("继续前行");
} else {
alert("继续努力");
}}
</script>
</head>
<body>
<input type="button" name="submit" id="submit" value="试试吧" onclick="try()" >
</body>
</html>怎么这样写会出问题呀。。
添加回答
举报
0/150
提交
取消