公告
财富商城
积分规则
提问
发文
2019-01-19 09:35发布
放我归山
what is the code to disable an INPUT text box for HTML?
Thanks
<input type="text" required="true" value="" readonly="true">
This will make a text box in readonly mode, might be helpful in generating passwords and datepickers.
<input type="text" disabled="disabled" />
See the W3C HTML Specification on the input tag for more information.
The syntax to disable an HTML input is as follows:
<input type="text" id="input_id" DISABLED />
You can Use both disabled or readonly attribute of input . Using disable attribute will omit that value at form submit, so if you want that values at submit event make them readonly instead of disable.
<input type="text" readonly>
or
<input type="text" disabled>
最多设置5个标签!
This will make a text box in readonly mode, might be helpful in generating passwords and datepickers.
See the W3C HTML Specification on the input tag for more information.
The syntax to disable an HTML input is as follows:
You can Use both disabled or readonly attribute of input . Using disable attribute will omit that value at form submit, so if you want that values at submit event make them readonly instead of disable.
or