codeGK
Code it ALL
jQuery get text() - CodeGK

♦ jQuery get text()

♣ Example2: jQuery get text()

Returns the Textual content of selected HTML element, i.e, the output will only be having text and the tags will be ignored.
Below is the representation of jQuery get text() Syntax.
Basic Syntax
$(selector).text();
selector: the HTML element to be selected
text(): syntax for selecting on text and ignoring html tags.
In this example, .
Example
Input:
Output: