+ 1
GetElementByTag("canvas")is not not defined error..plz help...
var canvs=getElementsByTag("canvas"); var context=getContext("2d"); context.beginPath(); context.arc(39,30,50,Math.pi*2,Math.pi*2,false ); context.closePath(); context.fillStyle="rgb(250,30,30)";
2 Antworten
+ 2
When you are selecting you canvas element, using the method "getElementsByTag", you forgot to tell JS in which object the method applies.
var canvas = document.getElementsByTag("canvas")
or
var canvas = body.getElementsByTag("canvas")
+ 2
I'll try this...thnx @nicolas