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 Link to comment https://forums.phpfreaks.com/topic/199095-documentgetelementbyidtblinnerhtml-not-working-in-ie/ 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 Link to comment https://forums.phpfreaks.com/topic/199095-documentgetelementbyidtblinnerhtml-not-working-in-ie/#findComment-1045022 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.