如果这是一个非常愚蠢的问题,我很抱歉,我对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 …Run Code Online (Sandbox Code Playgroud)