1) Scope of application: readonly:input[type="text"],input[type="password"],input[type="teaxtarea"] disabled: all form elements, such as select, radio, checkbox, button, etc. 2) Operation: readonly: users are not allowed to modify the operation, and no other operations are affected disabled: Prevents all user operations, including user click events and focus events 3) Form submission: readonly: The value of the form element can be submitted to the server. disabled: The value of the form element will not be submitted to the server, that is, the server cannot obtain the value of this form element Common applications: a> In a form, a unique identification code is pre-filled for the user, and the user is not allowed to change it, but the value needs to be passed when submitting. In this case, its attribute should be set is readonly; b>Prevent duplicate submission of the form and use javascript to disable the submit button (form button) after submitting the form. c>Set checkbox and radio to read-only: disable default events such as: bind("click",function(){return false;}) in jQuery; |
<<: 4 ways to achieve a two-column layout with fixed left column and adaptive right column using CSS
>>: Sample code for making desktop applications with vue + Electron
The Linux seq command can generate lists of numbe...
[mysql] replace usage (replace part of the conten...
Virtual machine software: vmware workstation Imag...
ERROR 1290 (HY000) : The MySQL server is running ...
This article shares the specific code of jQuery t...
The following introduces the commonly used head s...
Table of contents Using routing plugins in a modu...
This article analyzes the consistency processing ...
Table of contents Configuration nfs server (nfs.s...
In Vue, we generally have front-end and back-end ...
1. Pull the redis image docker pull redis 2. Star...
This article uses an example to describe how to q...
In a cluster with master-slave replication mode, ...
I rewrote my personal website recently. I bought ...
This article example shares the specific code of ...