<br><div class="msgheader"> <div class="right"><span style="CURSOR: pointer" onclick="copycode(getid('phpcode45'));"><u>Salin kod</u></span></div>Kodnya adalah seperti berikut:</div> <div class="msgborder" id="phpcode45"> <br><!DOCTYPE html> <html> ; <br /><kepala> <br></head> height=" 300px" style="border:1px solid #d3d3d3;">Pelayar anda tidak menyokong teg kanvas</canvas> <br><script type="text/javascript"> =document .getElementById('tankMap'); <br>var ctx=canvas1.getContext('2d'); 🎜> ctx.shadowBlur=30,ctx.shadowColor="#008C46"; <br>ctx.fillStyle='#008C46'; fillRect( myX 17,myY,5,30); <br>ctx.fillRect(myX 6,myY 5,10,20); ; <br>ctx.arc(myX 11,myY 15,5,0, Math.PI*1.5); "# 008C46"; <br>ctx.moveTo(myX 11,myY 15); drawBall( ); <br>function changeDirect(){ <br>var code=event.keyCode; <br>switch(code){ <br>case 87: <br>myY--; >kes 68: <br>myX ; <br>kes 83: <br>myY ; >} <br>ctx.clearRect(0,0,500,300);//Redraw() < ;/html></div>