Click here to Skip to main content
15,908,674 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
i have
HTML
<div id="div1" >

//some html contet

</div>


on button click i want to store that content in some variable

please suggest..
Posted
Updated 30-Nov-11 20:03pm
v2
Comments
Prince Antony G 1-Dec-11 2:06am    
use javascript

1 solution

JavaScript
content = document.getElementById("div1").innerHTML;


If you are going to ask a question on each problem like this one, you will never complete any project. Use JavaScript documentation.

—SA
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900