js问题 你在这个页面是就用变量之类的存储下状态发送到test.html,回来时再返送回来,再根据状态设定就好了。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 try(Cookie)<form action="test.html" method="post" name="myform" id="myform" onsubmit=setFormCookie(this)><table> <tr class="white" > <td width="64" height="24" align="center" style="font-weight:bold"> 15,000.00</td> <td width="112" height="24" align="center"><input name="feiyong" type="text" class="input" id="feiyong1" tabindex="1" value="14035.15" size="16" disabled="disabled" /></td> <td width="24" height="24" align="center"><input type="checkbox" name="ChkDel" id="ChkDel" value="225" onfocus="this.blur()" onclick="javascript:chkRow(this,'feiyong1');" /></td> </tr> <tr class="white" > <td height="24" align="center" style="font-weight:bold"> 15,000.00</td> <td height="24" align="center"><input name="feiyong" type="text" class="input" id="feiyong2" tabindex="1" value="14035.15" size="16" disabled="disabled" /></td> <td height="24" align="center"><input type="checkbox" name="ChkDe2" id="ChkDe2" value="226" onfocus="this.blur()" onclick="javascript:chkRow(this,'feiyong2');" /></td> </tr> <tr class="white" > <td height="24" colspan="3" align="center" style="font-weight:bold"><label> <input type="submit" name="button" id="button" value="提交" /> </label></td> </tr></table></form><script language="javascript"><!--function $(id){return document.getElementById(id)}function setFormCookie(_this){document.cookie="Formchecked="+$("ChkDel").checked+"*"+$("ChkDe2").checked;return true}//写Cookiefunction chkRow(obj,id){document.getElementById(id).disabled = !obj.checked;}function GetCookie(Name) {//读Cookie中Name的值 var search = Name + "=" var Cookie =document.cookie; if (Cookie.length <= 0 || Cookie.indexOf(search)==-1)return null;// cookie 不存在 或 'openid' 不存在,返回 0 else{ var tmp= Cookie.split(search)[1].split(";")[0] return unescape(tmp) }}onload=function(){ var obj1=$("feiyong1"),obj2=$("feiyong2"); var tmp=GetCookie('Formchecked'); if (tmp){//'Formchecked'有效,设定对应的状态 tmp=tmp.split("*"); obj1.checked=tmp[0]; obj2.checked=tmp[1]; chkRow(obj1,'feiyong1'); chkRow(obj2,'feiyong2'); }}//--></script> 可以session或cookie缓存,服务器端为session缓存,客户端为cookie缓存(4楼) 简单一点,加个onload事件reset一下form就可以了window.onload=function(){ document.getElementById("myform").reset();} session 把 它 存 起 来!! jquery的进度条问题 Jquery获取到div中checkbox中每一组的数量 jquery simplemodal遮罩的问题,高手帮解决!! EXTJS GridPanel 显示数据量 读取数据完后的事件 刚学js 超链接调用js 问题 求教如何锁定页面滚动条 如何脱机调试 哪位记得如何禁用IE的右键菜单功能?小弟一下想不起来了! Extjs 窗体问题 请教:这个onLoad事件怎么不起反应 高分求一个鼠标效果 请问jquery问题,谢谢
<table>
<tr class="white" >
<td width="64" height="24" align="center" style="font-weight:bold">
15,000.00</td>
<td width="112" height="24" align="center"><input name="feiyong" type="text" class="input" id="feiyong1" tabindex="1" value="14035.15" size="16" disabled="disabled" /></td>
<td width="24" height="24" align="center"><input type="checkbox" name="ChkDel" id="ChkDel" value="225" onfocus="this.blur()" onclick="javascript:chkRow(this,'feiyong1');" /></td>
</tr>
<tr class="white" >
<td height="24" align="center" style="font-weight:bold">
15,000.00</td>
<td height="24" align="center"><input name="feiyong" type="text" class="input" id="feiyong2" tabindex="1" value="14035.15" size="16" disabled="disabled" /></td>
<td height="24" align="center"><input type="checkbox" name="ChkDe2" id="ChkDe2" value="226" onfocus="this.blur()" onclick="javascript:chkRow(this,'feiyong2');" /></td>
</tr>
<tr class="white" >
<td height="24" colspan="3" align="center" style="font-weight:bold"><label>
<input type="submit" name="button" id="button" value="提交" />
</label></td>
</tr>
</table>
</form><script language="javascript">
<!--
function $(id){return document.getElementById(id)}
function setFormCookie(_this){document.cookie="Formchecked="+$("ChkDel").checked+"*"+$("ChkDe2").checked;return true}//写Cookie
function chkRow(obj,id){document.getElementById(id).disabled = !obj.checked;}function GetCookie(Name) {//读Cookie中Name的值
var search = Name + "="
var Cookie =document.cookie;
if (Cookie.length <= 0 || Cookie.indexOf(search)==-1)return null;// cookie 不存在 或 'openid' 不存在,返回 0
else{
var tmp= Cookie.split(search)[1].split(";")[0]
return unescape(tmp)
}
}onload=function(){
var obj1=$("feiyong1"),obj2=$("feiyong2");
var tmp=GetCookie('Formchecked');
if (tmp){//'Formchecked'有效,设定对应的状态
tmp=tmp.split("*");
obj1.checked=tmp[0];
obj2.checked=tmp[1];
chkRow(obj1,'feiyong1');
chkRow(obj2,'feiyong2');
}
}
//-->
</script>
可以session或cookie缓存,服务器端为session缓存,客户端为cookie缓存(4楼)
window.onload=function()
{
document.getElementById("myform").reset();
}