robert_gsfame Posted April 20, 2010 Share Posted April 20, 2010 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 Quote Link to comment Share on other sites More sharing options...
robert_gsfame Posted April 20, 2010 Author Share Posted April 20, 2010 okay instead of using innerHTML, i prefer to use .style.display="none" as it will give me the result i expect Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.