日期:2014-05-17  浏览次数:21106 次

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

VBScript code


<%
Dim shifts,action
Dim shifts_numRows
dim c1,c2 '''计数器
dim oper '操作人
c1=0
c2=0
dim 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 jobtype
dim type1
Dim 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()
Wend
If (shifts.CursorType > 0) Then
  shifts.MoveFirst
Else
  shifts.Requery
End 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()
Wend
If (jobtype.CursorType > 0) Then
  jobtype.MoveFirst
Else
  jobtype.Requery
End 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="retur