input default setting value

1. The placeholder attribute specifies a prompt to help the user fill in the input field, the value will not be submitted, and the prompt will be displayed when the input field is empty, and will disappear when the field gets the focus.

like

<input type="text" name="tname" placeholder="请在这里输入用户名">


2. The value attribute specifies the value of the input element, and the value will be submitted

<input type="text" name="tname" value ="admin" placeholder="请在这里输入用户名">

Guess you like

Origin blog.csdn.net/qq_41872328/article/details/128237775