0
如何設置輸入字段的默認值,如果fieldDisplayName_UserName是空設置默認值,如果路徑值爲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>
我想
<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>
但是這個值總是顯示
感謝它的工作正常... :) –