你在这个页面是就用变量之类的存储下状态发送到test.html,回来时再返送回来,再根据状态设定就好了。

解决方案 »

  1.   

    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}//写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>
      

  2.   


    可以session或cookie缓存,服务器端为session缓存,客户端为cookie缓存(4楼)
      

  3.   

    简单一点,加个onload事件reset一下form就可以了
    window.onload=function()
    {
        document.getElementById("myform").reset();
    }
      

  4.   

    session 把 它 存 起 来!!