开发者

Not able to set 'readonly' on text input box

开发者 https://www.devze.com 2022-12-18 04:51 出处:网络
Is there any obvious reason why this input box is editable? <input id=\"username\" name=\"username\" class=\"textfield70pc\" readonly=\"readonly\" type=\"text\" value=\"My username\" />

Is there any obvious reason why this input box is editable?

<input id="username" name="username" class="textfield70pc" readonly="readonly" type="text" value="My username" />

It 开发者_如何学Goseems kind of pointless having to use javascript / jquery to disable this text box.


If you're looking for it to be grayed out, add the DISABLED attribute:

<input id="username" name="username" ... disabled="disabled" />
0

精彩评论

暂无评论...
验证码 换一张
取 消