jQuery Tutorial


jQuery Example


jQuery References


jQuery HTML text() Method Reference


  All jQuery with HTML Method References


Uses

jQuery text() method Sets the text content of selected elements.


Syntax

$(selector).text(content)

jQuery text() method supported following parameters.

ParameterDescription
contentcontent is Required parameter. content text set on selected element.

jQuery text() Method Example

<script type="text/javascript"> 
$(document).ready(function(){
  $("button").click(function(){
	$("p").text("Web Development Tutorial");
  });
});
</script>
Online Try This Code Your Self....   »

  All jQuery with HTML Method References