Apr 4, 2004 #1 aspjunior Programmer Joined Feb 6, 2003 Messages 3 Location GB How do I grab all my stuff between two div tags using innerhtml?
Apr 4, 2004 #2 BillyRayPreachersSon Programmer Joined Dec 8, 2003 Messages 17,047 Location GB You can use getElementById, if the DIV has an ID... For example: Code: document.getElementById('myDiv').innerHTML = '<b>Hello World!</b>'; and Code: var myHTML = document.getElementById('myDiv').innerHTML; would work if there was a DIV with the ID of "myDiv" on the page: Code: <div id="myDiv"></div> Hope this helps, Dan Upvote 0 Downvote
You can use getElementById, if the DIV has an ID... For example: Code: document.getElementById('myDiv').innerHTML = '<b>Hello World!</b>'; and Code: var myHTML = document.getElementById('myDiv').innerHTML; would work if there was a DIV with the ID of "myDiv" on the page: Code: <div id="myDiv"></div> Hope this helps, Dan