Hello friends.

I have a webpage (my.aspx).
In that page i have some controls inside div tag and some controls outside div tag.
Now i want the html source of those controls which are inside div tag using JAVASCRIPT.

How can i do this.

I got the code with which i can get the source of whole page. the code is written in JAVASCRIPT.

function getHtml()
 {
    var srch = document.documentElement.innerHTML;
 }

I got the solution of it.
here is the code

var srch = document.getElementById('divToFind').innerHTML;

you can get values in javascript using document.getElementById('divname').innerHTML

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.