<!DOCTYPE HTML>
<html>
<head>
<script>
function min_(){
var mychar=prompt("0-5");
mychar=parseInt(mychar);
if(mychar<=10)
{
switch(mychar)
{
case 1:
alert("1");
break;
case 2:
alert("2");
break;
default:
setTimeout(window.close(),3000);
}
}
}
</script>
</head>
<body>
<input name="button" type="button" onclick="min_()" value="打开" />
</body>
</html>
纠正错误
忆木偶
相关分类