如果这是一个非常愚蠢的问题,我很抱歉,我对 JavaScript 有点陌生。我正在尝试制作一个包含多个功能的网页,但只有第一个功能会成功。我在谷歌上搜索,我只得到一次调用多个函数的结果,但这不是我想要的。这是我正在尝试做的一个例子:
<html>
<head>
<script type="text/javascript">
function frogger()
{
document.getElementById("descriptions").innerHTML="Frogger <br />Description: Get
the frog to the islands at the top of the screen without falling into the water or
getting hit by cars. <br />Controls: Up arrow key to move forward, down arrow key to
move backward, left arrow key to move left, and right arrow key to move right.";
}
function clear()
{
document.getElementById("descriptions").innerHTML=" ";
}
</script>
</head>
<body>
<div id="descriptions" style="{height:100;}">
</div>
<div class="game" onmouseover="frogger()" onmouseout="clear()">
<a href="/arcade/frogger.html"><img border="0" src="http://ggmedia.site50.net
/pics/frogger.PNG" height="100" width="100" /><br />Frogger</a>
</div>
</body>
</html>
感谢您的帮助!