salve a tutti.. stavo facendo qualche esercitazione sull'HTML 5..
da un libro di testo ho preso questo esempio, ma non mi funziona proprio:S
teoricamente dovrei disegnare un arco con la funzione canvas, ma non succede assolutamente nulla T.Tcodice:<html> <head> <title>Smile></title> <script> function init() { var ctx=document.getElementById("canvas").getContext('2d'); ctx.beginPath(); ctx.strokeStyle="rgb(200,0,0)"; cyt.arc(200, 200,500,0, Math.PI, false); ctx.stroke(); } </script> </head> <body onLoad="init();"> <canvas id="canvas" width="400" height="300"> Your browser doesn't support the HTML5 element canvas. </canvas> </body> </html>

Rispondi quotando