ghost's

导航

页面刷新后仍然保留所有文本框中的内容

<html>
<head> 
<style type="text/css">
       .sHistory {behavior:url(#default#savehistory);}
    </style>
  <script language="javascript" type="text/javascript" >    
  function SetHistory()
{
  
    var txtboxs = document.getElementsByTagName("input");
    for (var i=0;i<txtboxs.length;i++)
    {
        if (txtboxs[i].type=="text")
        {     
            txtboxs[i].className="sHistory";     
        }
    }
}  
    </script>


</head>
<body>
<table style="width: 805px; border-right: #00ccff 1px solid; border-top: #00ccff 1px solid; border-left: #00ccff 1px solid; border-bottom: #00ccff 1px solid; background-color: #f9f9f9;" border="0" cellpadding="0" cellspacing="0" id="T_ExamPage_Add">
          
            <tr>
                <td style="width: 3px;" align="left" valign="top">
                    <table style="width: 794px; left: 10px; position: relative; top: 15px;">
                    <tr>
                            <td style="width: 113px" align="right">
                                <strong>第一步:</strong></td>
                            <td style="width: 658px">
                                <span style="color: #0000ff">编辑试卷基本信息</span></td>
                        <td>
                        </td>
                    </tr>
                        <tr>
                            <td style="width: 113px">
                                试卷标题</td>
                            <td style="width: 658px">
                                <input id="txt_ExamPage_Title"  type="text" style="width: 567px" /></td>
                            <td>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 113px">
                                试卷发布声明</td>
                            <td style="width: 658px">
                                <input id="txt_ExamPage_Explicit"   class="sHistory" type="text" style="width: 567px" /></td>
                            <td>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 113px; height: 26px;">
                                试卷来源</td>
                            <td style="width: 658px; height: 26px;">
                                <input id="txt_ExamPage_Order"  class="sHistory" type="text" style="width: 567px" /></td>
                            <td style="height: 26px">
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 113px; height: 26px">
                                考试时间</td>
                            <td style="width: 658px; height: 26px">
                                <input id="txt_ExamPage_ExamTime" type="text" style="width: 115px" maxlength="3" /></td>
                            <td style="height: 26px">
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 113px; height:113px">
                                &nbsp;</td>
                            <td style="width: 658px; height: 113px;" valign="top">
                                &nbsp;<div id="d_ControlPanel"><table style="width: 100%; height: 30px" border="0" cellpadding="0" cellspacing="0">                       
                        <tr>                         
                            <td style="width: 100%; height: 30px" align="right">
                                    <input id="btn_ExamPage_Pre" style="width: 100px; height: 30px" type="button" value="上一步" onclick="return btn_ExamPage_Pre_onclick()" />
                                    <input id="btn_ExamPage_Next" onclick="return btn_ExamPage_Next_onclick()" style="width: 100px;
                                        height: 30px" type="button" value="下一步" />
                                    <input id="btn_ExamPage_Help" style="width: 100px; height: 30px" type="button"
                                        value="帮助" onclick="return btn_ExamPage_Help_onclick()" />&nbsp;
                            </td>
                        </tr>
                    </table></div>
                            </td>
                            <td style="height: 113px" >
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
  <script language="javascript" type="text/javascript" >   
    SetHistory();   
    </script>
</body>
</html>

posted on 2009-07-24 15:36  ghost's  阅读(1114)  评论(1编辑  收藏  举报