麻煩大神們幫我看看哪里寫錯了,點擊按鈕沒反映
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>無標題文檔</title>
<script type="text/javasctipt">
? function rec() {
? var score;
? score=85
? if(score>=90)
? {
? ? document.write("你真棒!");
? }
? else if(score>=80)
? {
document.write("真不錯!");??
? }
? else if(score>=70)
? {
? ? document.write("繼續努力!");
? }
? else
? {
document.write("你得非常努力!");??
? }
? }
</script>
</head>
<body>
? ? <input name="button" type="button" onClick="rec()" value="按 鈕" />
</body>
</head>
<body>
</body>
</html>
2019-02-20
沒有寫prompt啊怎么彈,這和寫不寫分號有什么關系
2018-12-22
樓上是對的,其他人寫的是什么?要用prompt呀
2018-12-11
2018-12-07
2018-12-07
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>判斷語句</title>
? <script type="text/javascript">
? function rec(){
var score ;
score =85; //score變量存儲成績,初值為80
if(score>=90)
? ? {
? ? ? ? document.write("你真棒!");
? ? }
? ? else if(score>=80)
? ? {
? ? ? ? document.write("真不錯!");??
? ? }
? ? else if(score>=70)
? ? {
? ? ? ? document.write("繼續努力!");
? ? }
? ? else
? ? {
? ? ? ? document.write("你得非常努力!");??
? ? }
? }
? </script>
</head>
<body>
? ? ? ?<input name="button" type="button" onClick="rec()" value="按 鈕" />
</body>
</html>
2018-12-07
var = 85; 你少了分號