首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > ASP >

ASP页面文本框的值,怎么才能在刷新的时候不被清空

2012-03-26 
ASP页面文本框的值,如何才能在刷新的时候不被清空我写一个asp页面,里面有几个文本框,页面的运行的时候,会

ASP页面文本框的值,如何才能在刷新的时候不被清空
我写一个asp页面,里面有几个文本框,页面的运行的时候,会往这几个文本框中手工填上一些值,点提交后,会显示一个报表,但提交完以后,页面中的文本框的内容被清空了,如何才能让文本框在提交后,不清空,源码如下

VBScript code
<%Dim shifts,actionDim shifts_numRowsdim c1,c2 '''计数器dim oper '操作人c1=0c2=0dim arrayC1(1000)dim arrayC2(1000)dim arraycode(1000)'存徒弟工号,action=Request.QueryString("action")oper=Session("USERCODE")Set shifts = Server.CreateObject("ADODB.Recordset")abo = "SELECT  shift, code FROM  dbo.proc_shifts WHERE (active = 'true') AND (shift IN (1, 2, 3, 4, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22)) order by code"shifts.open abo, connm,1,1%><%Dim jobtypedim type1Dim jobtype_numRows' Set jobtype = Server.CreateObject("ADODB.Recordset")abo = "select job as type1 ,name as name from proc_jobs where dimension1=1 order by jobtype "jobtype.open abo, connm,1,1%><%masterno=request.Form("masterno")subno=request.Form("subno")oper=request.Form("oper")%><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>查询结果</title><style type="text/css"><body><form id="form_wz" name="form_wz" method="post" action="master_4.asp"><p><span class="sidebarHeader">班次搜索:</span>      <label>        <select name="shift">        <%While (NOT shifts.EOF)%>          <option value="<%=(shifts.Fields.Item("shift").Value)%>" <%If (Not isNull((dbshift_first))) THEN  IF CSTR(shifts.Fields.Item("shift").Value)=CSTR(shift) Then Response.Write("selected=""selected""") : Response.Write("")%> ><%=(shifts.Fields.Item("code").Value)%></option>        <%  shifts.MoveNext()WendIf (shifts.CursorType > 0) Then  shifts.MoveFirstElse  shifts.RequeryEnd If%>      </select>    </label>    工种        <select name="jobtype">           <%While (NOT jobtype.EOF)%>          <option value="<%=(jobtype.Fields.Item("type1").Value)%>" <%IF jobtype.Fields.Item("type1").Value<>""   Then Response.Write("selected=""selected""") %> ><%=(jobtype.Fields.Item("name").Value)%></option>        <%  jobtype.MoveNext()WendIf (jobtype.CursorType > 0) Then  jobtype.MoveFirstElse  jobtype.RequeryEnd If%>    </select>  <span class="sidebarHeader">徒弟工号:  <input name="subno" type="text" id="subno" size="15" />    师傅工号:  <input name="masterno" type="text" id="masterno" size="15" />  <label></label>  </span>操作人:<span class="sidebarHeader">  <input name="oper" type="text" id="oper" size="15" />  </span></p><p><span class="sidebarHeader">操作时间:    <input name="time" type="text"  id="time" onClick="getDateString(this,oCalendarChs)" value="<%Response.Write(days)%>" size="10" maxlength="20">    ---    <input name="time2" type="text"  id="time2" onclick="getDateString(this,oCalendarChs)" value="<%Response.Write(days)%>" size="10" maxlength="20" />     </span>  <input type="submit" name="button2" onClick="return checkt(this.form);" id="button2" value="搜索" />  &nbsp;&nbsp;&nbsp;&nbsp;  <input type="submit" name="button" id="button"  onClick="javascript:window.print()" " value="打印" /></p></form><p>  <script language="javascript">            function checkt(frm)            {                if(frm.time.value=="开始日期")                {                    alert('请点击选择日期后搜索');                    return false;                }                return true;            }        </script>  <%If not checkbox="" Thenresponse.ContentType ="application/vnd.ms-Excel"END IF%>  <span class="STYLE6"><span class="STYLE7"><br />  </span></span><span class="STYLE1">查询日期:  <%Response.Write(days)%>  到   <%Response.Write(days2)%>    查询班次:    <%Response.Write(shiftcode)%>  </span>  <br />  <span class="STYLE7">登录人  :  <%Response.Write(Session("namestring"))%>ID:<%Response.Write(Session("USERCODE"))%>  </span></p><table width="843" border="0">    <tr>    <td valign="top"><table width="693" height="21" border="1" align="left" title="报表">      <tr bgcolor="#FFFF0B">        <th width="32" align='center' nowrap='nowrap' scope='col'>序号</th>        <th width="70" align='center' nowrap='nowrap' scope='col'>班次</th>        <th width="94" align='center' nowrap='nowrap' scope='col'>师傅工号</th>        <th width="66" align='center' nowrap='nowrap' scope='col'>师傅姓名</th>        <th width="74" align='center' nowrap='nowrap' scope='col'>徒弟工号</th>        <th width="97" align='center' nowrap='nowrap' scope='col'>徒弟姓名</th>        <th width="77" align='center' nowrap='nowrap' scope='col'>徒弟工种</th>        <th width="74" align='center' nowrap='nowrap' scope='col'>指派时间</th>        <th width="51" align='center' nowrap='nowrap' scope='col'>操作人</th>'shifts.close%>      </tr>    </table></td>  </tr>  <tr><td>  </td>  </tr></table></body></html> 



[解决办法]
http://wenwen.soso.com/z/q101414418.htm

热点排行