There are many ways to
batch set properties, and in this article, you can use jquery to set readonly and disabled properties in bulk
The jquery API provides a way to apply disabled and ReadOnly attributes to elements, recorded here. The following: 1.readonly code is as follows: $ (' input '). attr ("ReadOnly", "ReadOnly")//sets the INPUT element to readonly $ (' input '). Removeattr ("readonly")//Remove the ReadOnly attribute if ($ (' input ') of the INPUT element. attr ("readonly") ==true)/ Determine if the INPUT element has set the ReadOnly property There are two: $ (' input ') for the method to set the ReadOnly property for the element and to cancel the ReadOnly property. attr ("ReadOnly" , true)//sets the INPUT element to readonly $ (' input '). attr ("ReadOnly", False)//Remove the ReadOnly attribute of the INPUT element $ (' input ') . attr ("ReadOnly", "ReadOnly")//sets the INPUT element to readonly $ (' input '). attr ("ReadOnly", "")//Remove the ReadOnly attribute of the INPUT element 2.disabled code is as follows: $ (' input '). attr ("Disabled", "disabled")//set the INPUT element to disabled $ (' INP UT '). Removeattr ("Disabled")//Remove disabled attribute if ($ (' input ') of INPUT element. attr ("disabled") ==true)/ Determine if the INPUT element has set the disabled property The following two kinds of: code are available for setting the disabled property for an element and canceling the disabled property as follows: $ (' input '). attr (" Disabled ", true)//sets the INPUT element to disabled $ (' inPut '). attr ("disabled", false)//Remove the disabled attribute of the INPUT element code as follows: $ (' input '). attr ("Disabled", "disabled")/ Sets the input element to disabled $ (' input '). attr ("Disabled", "")//Remove the disabled attribute of the INPUT element