看了半天沒看出來哪里錯了,大神幫忙解答下
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>prompt</title>
? <script type="text/javascript">
? function rec(){
? ? var score;
score=prompt("你們的考試分?jǐn)?shù)")
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="點(diǎn)擊我,對成績做評價!" />
</body>
</html>
2016-11-10
?else if (score>=75)?
? ? {
document.write("不錯哦!");
這里少了個又半大括號吧
2016-11-18
score=prompt("你們的考試分?jǐn)?shù)");??
你的分號不見了