topjavatutorial.com
Updating element content in jQuery - TopJavaTutorial
We can use following jQuery methods to update content of elements in jQuery selection. text() html() replaceWith remove() .text() This method can be used to update the text content of the matching elements. Any markup data will be shown as text. HTML This is a paragraph Click me jQuery $(document).ready(function(){ $("button").click(function(){ $("p").text("Paraghaph contents updated"); […]