Home  >  Article  >  Web Front-end  >  Pay attention to jquery text()_jquery

Pay attention to jquery text()_jquery

WBOY
WBOYOriginal
2016-05-16 18:43:01875browse

Of course, I am a novice in jquery. What $.text() gets is the text of all matching elements. It should be noted that $.text(val) will replace the Delete everything (including the html tag inside) and set text, which is equivalent to $.html (val). The official statement is "Set the text contents of all matched elements. Similar to html(), but escapes HTML (replace "<" and "> ;" with their HTML entities)."

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn