Home > Article > Web Front-end > How to set the value of the text field in the page
tag defines a multi-line text input control.
The text area can hold an unlimited amount of text, and the default font for the text is a fixed-width font (usually Courier).
You can specify the size of the textarea through the cols and rows attributes, but a better way is to use the CSS height and width attributes.
Note: Use "%OD%OA" (carriage return/line feed) to separate lines of text in the text input area.
JQuery retrieves and assigns values to textarea
Value
var qrcodefortemcontent=$("#qrcodefortemcontent ").val();
Assign value
$("#qrcodefortemcontent").val("123");
JQuery gives label
Value
next_openid=$("#next_openid2").text();
$("#hasnext2").text('YES');
$ ("#hasnext2").text('YES');
JQuery takes the value of input
qrcodeforeverflag=$("#qrcodeforeverflag").val() ;
Assignment
$("#qrcodeforeverflag").val("123");
tips:Use '' in the html tag Or "" is sometimes different. It is safer to use "", but when there is escape, you need to use ''
The above is the detailed content of How to set the value of the text field in the page. For more information, please follow other related articles on the PHP Chinese website!