How to set input field default value if fieldDisplayName_UserName is null
<td><form:input type="text" path="fieldDisplayName_UserName" id="fieldDisplayName_UserName" onblur="if (this.value == '')
{this.value = 'User Name';}"
onfocus="if (this.value == 'User Name') {this.value = '';}" /></td>
I am trying
<td><form:input type="text" path="fieldDisplayName_UserName"
id="fieldDisplayName_UserName" onblur="if (this.value == '')
{this.value = 'User Name';}" onfocus="if (this.value == 'User Name') {this.value = '';}" value="User Name"/></td>
but this value always shown
你可以尝试设置一个placeholder
就像是在暗示这个职位
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.