怎么彈不出對話框?
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>score</title>
? <script type="text/javascript">
? function rec(){
??? var score;
score=prompt("請輸入你的成績");
if(score>=90){
?document.write("你很棒");
}
else if(score>=75){
?document.write("還不錯");
}
else if(score>=60){
?document.write("及格了");
}
else{
?document.write("不及格");
}
? </script>
</head>
<body>
??? <input name="button" type="button" onClick="rec()" value="點擊我,彈出對話框" />
</body>
</html>
2017-01-18
2017-01-18
rec()方法最后少了個括號”}“
2017-01-18
如圖,少個大括號
2017-01-18
JS最后少了一個括號