Hi all we have a page that a div tag added at the first line of its html codes, means before the HTML tag like the following code: <div style="position:absolute;left:1;top:1;width:122;border:1px solid #C0C0C0;z-index:10;background-color:white" id="634143432" dir="ltr"> <table> . . </table> <html> . . Code (markup): the ID attribute is variable and i can't access it with getElementById function.... whould u please help me about removing this div from my html codes?
use this and it will work as long as it really is the first div tag on the page ( which means it has an index of 0 in the array of div tags on the page) document.getElementsByTagName("div")[0].style.display="none"; Code (markup):