js控制文本框只读
作者:互联网
<HTML>
<SCRIPT LANGUAGE="JavaScript">
function isreadonly(isReadOnly){
document.forms[0].elements['sss'].readOnly =isReadOnly;
}
</SCRIPT>
<BODY>
<FORM METHOD=POST ACTION="">
<INPUT TYPE="text" NAME="sss">
<INPUT TYPE="button" name="zhidu" value="只读" οnclick="isreadonly(true)">
<INPUT TYPE="button" name="edit" value="可编辑" οnclick="isreadonly(false)">
</FORM>
</BODY>
</HTML>
标签:function,elements,只读,isReadOnly,文本框,js,isreadonly 来源: https://blog.51cto.com/u_14943622/2834966