Hallo Felix,
function cleanCanvas() {
var canvas = document.getElementById("myCanvas");
while (canvas.firstChild) {
canvas.removeChild(canvas.firstChild);
}
}
Dann geht's aber auch kürzer. ;-)
~~~javascript
function cleanCanvas() {
document.getElementById("myCanvas").innerHTML = '';
}
Grüße
Marc Reichelt || http://www.marcreichelt.de/
--
panic("Oh boy, that early out of memory?");
linux-2.2.16/arch/mips/mm/init.c
Selfcode: ie:{ fl:| br:> va:} ls:< fo:} rl:( n4:( ss:) de:> js:| ch:? sh:| mo:) zu:)
panic("Oh boy, that early out of memory?");
linux-2.2.16/arch/mips/mm/init.c
Selfcode: ie:{ fl:| br:> va:} ls:< fo:} rl:( n4:( ss:) de:> js:| ch:? sh:| mo:) zu:)