Question and answer is powered by AnsPress.io
In HTML page, I want to get some HTML element form a div. If my div like that:
<div id="MyDiv"> <p>somthing ..............</p> <p>somthing ..............</p> <p>somthing ..............</p> </div>
Then how can I get MyDiv value using jquery.
Apply it
<script> $('#MyDiv').text(); </script>
OR
<script> $('#MyDiv').html(); </script>