almost 6 years ago
This method is used to change the content of the elements . It change only selected elements .It can also replaces the selected content with new content.It doesn't take any arguments.
Return content :
$(selector).html(content) // It return the content of the all matched elements
Set Content :
$(selector).html(function(index, currentcontent)) // It is used to overwrites the content of all the matched elements
HTML Code :
<button>Click here to see the change of selected contents of matched elements</button>
<p>It will change after click on button</p>
jQuery Code :
Before jQuery :
It will change after click on button
After jQuery :
Hello Mukesh // Content of p has been changed
Starting with Chrome version 45, NPAPI is no longer supported for Google Chrome. For more information, see Chrome and NPAPI (blog.chromium.org).
Firefox and Microsoft Internet Explorer are recommended browsers for websites using java applets.
Chrome Version Support
Are you sure, you want to delete this comment?
Terms of Service
| © copyright 2021 FindNerd.com. All rights reserved.
Sign up using