. HTML () corresponds to the innerHTML in JS for HTML tags that read and modify elements
. HTML () is the HTML content (including its HTML tags) that is used to read elements, and the. HTML () method reads only the first element when used on multiple elements
. text () to read or modify elements of plain text content corresponding to the innertext in JS
Text () is used to read the plain text content of an element, including its descendant elements;. The text () method cannot be used on form elements
. val () to read or modify value values for form elements
. Val () is the "value" value used to read form elements, and. Val () can only be used on form elements
On the difference between three people
. Val () method and. HTML () is the same, and if it is applied on more than one element, only the value of the first FORM element can be read, but. Text () is different from them, and if. Text () is applied to more than one element, the text content of all selected elements will be read.
2. HTML (),. Text (),. Val () can dynamically change the contents of multiple elements by using the return value of the callback function.