Home > Article > Web Front-end > Summary of several methods for setting text input boxes in form elements to be non-editable_javascript skills
Code:
The input box cannot get focus and cannot be edited
The form can get the value.
Can be copied.
It’s quite strange, you’ve selected it, but you haven’t gained focus yet?
2,readonly
Code:
The input box is read-only. Cannot be edited
The same form can get the value.
Can also be copied.
3,disabled
Code: