怎样实现点击之后按钮不消失?
想实现点击n次按钮就出现n个介于0-10之间的整数的功能。能不能使按钮点击一次不消失?
2017-07-22
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Mathint </title>
<script type="text/javascript">
function random(){
var i=Math.random()*10;
alert("随机数:"+i+"四舍五入后:"+Math.round(i));}
</script>
</head>
<body>
<input type="button" value="运行" onclick="random()"/><br>
</body>
</html>
举报