Method that changes the value of the readonly attribute of input multiple times at a time with js

  • 2020-03-30 03:19:08
  • OfStack

 
<script> 
function doclick1(){ 
var txtN = document.getElementsByTagName("input"); 
for(i=0;i<txtN.length;i++){ 
if(txtN[i].type="text"){ 
txtN[i].readOnly=false; 
} 
} 
} 
</script> 
<input type="text" id="contactus1" readonly> 
<input type="text" id="contactus2" readonly> 
<input type="text" id="contactus3" readonly> 
<input type="button" name="button4" value=" Modify the " onclick="doclick1();" /> 

Related articles: