Home  >  Article  >  Web Front-end  >  Summary of the differences between jquery text(), val(), and html() methods_jquery

Summary of the differences between jquery text(), val(), and html() methods_jquery

WBOY
WBOYOriginal
2016-05-16 17:17:53978browse

text():1. Get the text content of each matching element without parameters

2. There are parameters. Assign a value

to each matching element

val():

1. Get the value of the first matching element without parameters 2. There are parameters. Assign a value to each matching element

html():1. Get the tag content

of the first matching element

without parameters 2. There are parameters to assign values ​​ to each matching element

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