<!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"> </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> </p>
<p> </p>
<p>
<input type="button" name="btnChImgTxt" value="ChangeImageText" onClick="funCgImgTxt()" >
</p></td>
</tr>
</table>
<input type="hidde" name="hidInt" value="0">
不知是不是你说的那种效果参考一下吧!~
</body>
</html>
<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"> </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> </p>
<p> </p>
<p>
<input type="button" name="btnChImgTxt" value="ChangeImageText" onClick="funCgImgTxt()" >
</p></td>
</tr>
</table>
<input type="hidde" name="hidInt" value="0">
不知是不是你说的那种效果参考一下吧!~
</body>
</html>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货