<html>
<head>
<script language="JavaScript">
var question="10+20是多少?";
var answer=30;
var x3=prompt(question,"0");
</script>
</head>
<body>
<script language="JavaScript">
if(x3=answer){
document.write("计算正确");
}else{
document.write("计算错了");
}
</script>
</body>
</html>
[此贴子已经被作者于2006-3-7 19:49:13编辑过]