為什么代碼在課程里顯示正常,在Dreamweaver點擊就彈不出對話框?
代碼如下:
<!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>無標(biāo)題文檔</title>
<script type="text/javascirpt">
? function rec(){
?var score;
?score =prompt("成績");
?if(score>=90)
?{
document.write("真棒!");
?}
?else if(score>=75)
?{
?document.write("不錯呦");
?}
?else?
?{
?document.write("要努力了!");
?}
? ? }
? </script>
</head>
<body>
? <input name="button" type="button" onClick="rec()" value="點擊我,對成績做評價!" />
</body>
</html>
2015-08-27
不要在編輯器里面看效果,保存之后用瀏覽器來看