0
當我嘗試運行這個JavaScript它說,那裏有一個錯誤 「INDEX_SIZE_ERR:DOM異常1」HTML5畫布錯誤
的Javascript:
blocksize=50;
ctx=document.getElementById('wizard1').getContext('2d');
ctx.drawImage(document.getElementById('wizard.png'),0,0,105,105,0,0,3/7*blocksize,blocksize);
HTML:
<canvas id='wizard1'></canvas>
<img id='wizard.png' src='wizard.png' />
畫布默認爲300x150,所以這不是問題 – 2010-07-03 03:51:12