怎么點擊沒反應
<!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("請輸入成績","點此輸入");
? ? ? if(score==null){
? ? ? ? ? document.write("輸入錯誤");
? ? ? }
? ? ? if(score>=90){
? ? ? ? ? document.write("很棒!");
? ? ? }
? ? ? else if(score>=75){
? ? ? ? ? document.write("很好!");
? ? ? }
? ? ? else if(score>=60){
? ? ? ? ? document.write("繼續(xù)加油");
? ? ? }
? ? ? else{
? ? ? ? ? document.write("好好努力");
? ? ? }
? }
? </script>
</head>
<body>
? ? <input name="button" type="button" onClick="rec()" value="點擊我,對成績做評價!" />
</body>
</html>
2016-01-27
score=prompt("請輸入成績","點此輸入");這里面的逗號是中文的,應改為英文。
2016-01-18
if(score==null)去掉