 
  Data Structure Data Structure
 Networking Networking
 RDBMS RDBMS
 Operating System Operating System
 Java Java
 MS Excel MS Excel
 iOS iOS
 HTML HTML
 CSS CSS
 Android Android
 Python Python
 C Programming C Programming
 C++ C++
 C# C#
 MongoDB MongoDB
 MySQL MySQL
 Javascript Javascript
 PHP PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to replace innerHTML of a div tag using jQuery?
To replace innerHTML of a div tag, use the html() method. The dot notation calls the html() method to replace the inner html with the parameter placed between, i.e. Demo here. The html() here modifies the .innerhtml.
Example
You can try to run the following code to to replace innerHTML of a div tag using jQuery −
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>  <script>   <script>      $( document ).ready(function() {        $('.myclass').html('Demo');      }); </script> </head> <body>  <div class="myclass">Hello World</div> </body> </html>Advertisements
 