readonly attribute in html by javascript
document.getElementById("yourID").readOnly = true;
readonly attribute in html by javascript
document.getElementById("yourID").readOnly = true;
readonly vs disabled
- Readonly element is just not editable, but gets sent when the according form submits.
- Readonly elements can be focused (and getting focused when "tabbing" through a form).
- Disabled element isn't editable and isn't sent on submit.
- Disabled elements can't be focused (and getting focused when "tabbing" through a form).
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us