【发布时间】:2016-02-27 02:50:54
【问题描述】:
我在这里有一些代码,我正在努力找出它出了什么问题,我知道一些 javascript 是错误的,但是我将如何纠正它,非常感谢
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Numbers Games</title>
<link rel="stylesheet" type="text/css" href="style-home.css">
</head>
<body>
<div id="header"
<h1>Numbers Game</h1>
</div>
<p id="ParQuestion">What is five thousand and thirty three in numbers.</p>
<input id="txt_Ans" type="text" />
<input id="btn_Start" type="button" value="Start"
onclick="btn_Start_OnClick()" /><br />
<input id="btn_Check" type="button" value="Check" onclick="btn_Check_OnlClick()" />
<div id="Scoreboard">
<img id="scoreOn1" src="Pictures/Scorefaceoff1.gif" height="50px" width="50px" />
<img id="scoreOn2" src="Pictures/Scorefaceoff2.gif" height="50px" width="50px" />
<img id="scoreOn3" src="Pictures/Scorefaceoff3.gif" height="50px" width="50px" />
<img id="scoreOn4" src="Pictures/Scorefaceoff4.gif" height="50px" width="50px" />
<img id="scoreOn5" src="Pictures/Scorefaceoff5.gif" height="50px" width="50px" />
</div>
<p id="ParComment"></p>
</body>
</html>
<script language="javascript">
function btn_Check_OnClick(){
if txt_Ans.value = "5033"
parRes.InnerText=ParComment.value;
}else{
ParComment.InnerText="Wrong, Try Again";
}
}
</sript>
【问题讨论】:
-
欢迎来到 Stackoverflow。你认为那是什么 ?到目前为止你做了什么 ?为了让我们帮助你证明你做了实际的研究。 :)
-
话虽如此,
btn_Check_onlClick()?该特定功能在哪里定义?你的脚本块中有一个额外的}。
标签: javascript arrays function loops var