我在输出中得到的只是未定义 changeColor 和未定义 changeAgain。我试图修复它,但它似乎不起作用。任何帮助将不胜感激,我到处都看过!!!
这是我的代码
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body onLoad="alert('Website Loaded');">
<script language="javascript" type="text/javascript">
function changeColor() {
document.GetElementById("h3style").style.color = "red";
document.GetElementById("h3style").firstChild.nodeValue = "RED!";
return true;
}
function changeAgain() {
document.GetElementById("h3style").style.color = "gray";
document.GetElementById("h3style").firstChild.nodeValue = "Gray...";
return true;
}
</script>
<noscript>
<h1>THIS CONTENT REQUIRES JAVASCRIPT | PLEASE ENABLE JAVASCRIPT</h1>
</noscript>
<h3 id="h3style" onMouseOver="changeColor()" onMouseOut="changeAgain()">Scroll on me</h3>
</body>
</html>