<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<script language="JavaScript">
function funCgImgTxt(){
var varInt
varInt=parseInt(document.all("hidInt").value)
if (varInt==0){
document.all("hidInt").value="1"
alert("can't edit")
document.all("txtHidVis").readOnly=true
}else{
if (varInt==1){
document.all("hidInt").value="0"
alert("can edit")
document.all("txtHidVis").readOnly=false
}
}
}
</script><body>
<table width="820" border="1" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td height="35" id="id_td1">&nbsp;</td>
  </tr>
  <tr>
    <td height="35" id="id_td2"><input type=text name=txtHidVis value="1234567890" readonly style="border:none"></td>
  </tr>
  <tr>
    <td height="35"  align="center" valign="middle"><p>&nbsp;</p>
      <p>&nbsp;</p>
      <p> 
        <input type="button" name="btnChImgTxt" value="ChangeImageText" onClick="funCgImgTxt()" >
      </p></td>
  </tr>
</table>
<input type="hidde" name="hidInt" value="0">
不知是不是你说的那种效果参考一下吧!~
</body>
</html>