Jump to content

document.getElementbyId('tbl').innerHTML="" not working in IE


robert_gsfame

Recommended Posts

i have this javascript function

 

function cleartable(){

document.getElementById('tbl').innerHTML="";

}

 

and html code:

 

<table id="tbl"><tr><td>test</td></tr><tr><td><input type="button" value="clear" onclick="clearall()"></td></tr></table>

 

when i click on the button, i wish to erase all table..i've tried in both browsers FF and IE..but i dont get what i expect when using IE...table is still there but in FF it works

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.