<html>
<head>
<script type="text/javascript">
function disp_prompt()
{
var num1=prompt("Please enter the first number","");
var num2=prompt("Please enter the second number","");
var num3=prompt("Please enter the third number","");
document.write("这三个数值中的最大值是:"+Math.max(num1,num2,num3))
}
</script>
</head>
<body>
<input type="button" onclick="disp_prompt()"
value="Display a prompt box" />
</body>
</html>
追问能用!太感谢了! 请问“输出一个数值表格,内容为2到5,以及它们对应的平方和立方,用循环语句实现。”这个能指导一下吗?
追答肯定可以用啊,我测试过了的
追问最佳只能给一人,但是真的特别感谢你!你的这个也是能用的,界面更友好。