我有一些基本的開始畫面的代碼,但我想改變按鈕的圖像,我會怎麼做?HTML5 JavaScript遊戲開始畫面圖像按鈕更換
<div id="SplashScreen">
<h1>Game Title</h1>
<input id="StartButton" type="button" value="Start"/>
</div>
<canvas id="GameCanvas" style="display: none;">Game Stuff</canvas>
<script>
$("#StartButton").click(function() {
$("#SplashScreen").hide();
$("#GameCanvas").show();
});
</script>
所以我想播放按鈕被替換爲圖像?無論如何要做到這一點?
使用''? –
確定代碼中沒有「播放」按鈕。我認爲你的意思是「開始」按鈕。只需替換一個圖像,就等於'' – devnull69