複製代碼代碼如下:
<script>
函數doclick1(){
var txtn = document.getElementsbytagname(“ input”);
for(i = 0; i <txtn.length; i ++){
if(txtn [i] .type =“ text”){
txtn [i] .readonly = false;
}
}
}
</script>
<輸入type =“ text” id =“ contactus1” readonly>
<輸入type =“ text” id =“ contactus2” readonly>
<輸入type =“ text” id =“ contactus3” readonly>
<input type =“ button” name =“ button4” value =“修改” onclick =“ doclick1();” />