ページ上の画像を変更する画像ベースのボタンを作成しようとしています
ここに私が持っているコードがあります
<script type="text/javascript">
function nextimg()
{
alert("clicked")
document.getElementById("image").src="images/gallery/gallery-2.jpg";
}
</script>
<div class="gallery">
<table>
<tr>
<td><img src="images/lt_arrow_dark.png"/></td>
<td><img id="image" src="images/gallery/gallery-1.jpg"/></td>
<td><img onclick="nextimg()" src="images/rt_arrow_dark.png" height="55" width="24"/></td>
</tr>
</table>
</div>
画像をクリックしても何も起こりません。何か案は?ありがとう