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

ASP调用有关问题

2013-07-08 
ASP调用问题file1:%@LANGUAGEVBSCRIPT CODEPAGE936%!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.

ASP调用问题
file1:

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>红头文件提交</title>
</head>

<body>
<form action="file2.asp" method="post" enctype="multipart/form-data" name="form1" id="form1">
  <p>全文标题:
    <input name="title" type="text" id="title" />
</p>
  <p>地区:
    <input name="ad" type="text" id="ad" />
  </p>
  <p>日期:
    <label>
    <input name="date" type="text" id="date" />
    </label>
    <input name="date2" type="text" id="date2" />
  号</p>
  <p>文章标题:
    <input name="title2" type="text" id="title2" />
  </p>
  <p>主送机关:
    <input name="name1" type="text" id="name1" />
  </p>
  <p>正文:
    <textarea name="file1" id="file1"></textarea>
  </p>
  <p>附件:    
    <label>
    <input name="file2" type="text" id="file2" />
    </label>
    <input name="file2_1" type="file" id="file2_1" />
  </p>
  <p> 
     &nbsp;&nbsp;&nbsp;
     <input name="file3" type="text" id="file3" />
     <input name="file3_3" type="file" id="file3_3" />
  </p>
  <p>
    &nbsp;&nbsp;&nbsp; <input name="file4" type="text" id="file4" />
    <input name="file4_4" type="file" id="file4_4" />
  </p>
  <p>日期:
    <input name="year" type="text" id="year" />
  年
  <input name="month" type="text" id="month" />


  月
  <input name="day" type="text" id="day" />
  日</p>
  <p>
    <input type="submit" name="Submit" value="提交" />
    <input type="reset" name="Submit2" value="取消" />
  </p>
  <p>&nbsp;</p>
</form>
<%
   str1 = request.form("title")
   str2 = request.form("ad")
   str3 = request.form("date")
   str4 = request.form("date2")
   str5 = request.form("title2")
   str6 = request.form("name1")
   str7 = request.form("file1")
   str8 = request.form("file2")
   str9 = request.form("file3")
   str10 = request.form("file4")
   str11 = request.form("year")
   str12 = request.form("month")
   str13 = request.form("day") 
   Session("s1") = str1
   Session("s2") = str2  
   Session("s3") = str3
   Session("s4") = str4
   Session("s5") = str5
   Session("s6") = str6
   Session("s7") = str7
   Session("s8") = str8
   Session("s9") = str9
   Session("s10") = str10
   Session("s11") = str11
   Session("s12") = str12
   Session("s13") = str13
   function test(str)
     if str = " " then
    msgbox("您所填写的内容不能为空")
 end if
  end function 
%>
</body>
</html>


file2:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<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">
<!--
#Layer1 {
position:absolute;
left:29px;
top:56px;
width:1061px;
height:3px;
z-index:1;
background-color: #FF0000;


}
#Layer2 {
position:absolute;
left:46px;
top:55px;
width:1044px;
height:2px;
z-index:1;
background-color: #FF0000;
}
.STYLE1 {font-family: "仿宋"}
-->
</style>
</head>

<body>
<div align="center">
    <p>
      <%
       with response
               .Write session("s1")&"<br>"&"<br>"&"<br>"
               .Write session("s2")
   .Write "〔"
   .Write session("s3")
   .Write "〕"
               .Write session("s4")&"<br>"
   end with
   %>
</p>
    <p><img src="file_2.GIF" width="754" height="4" /> </p>
</div>
  <p>&nbsp;</p>
  
  <div align="left">
    <%
  
   with response
                 .Write session("s5")&"<br>"
 .Write session("s6")
 .Write ":"
 .Write "<br>"
   end with 
%>
   &nbsp;&nbsp;
<%
   response.Write session("s7")
%>
    <br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;附件:1.
<% response.write session("s8") %>
        <br>
     &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp; 2.
     <% response.write session("s9" )%>
    <br>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 3. 
<% response.write session("s10" )%>
    <br>
  </div>

   <div align="right" class="STYLE1"><% response.Write session("s11")%>年
                                      <% response.Write session("s12")%>月


  <% response.Write session("s13")%>日      &nbsp;&nbsp;&nbsp;  
   </div>
</body>
</html>



为什么file2 没有调用file1得到的数据,在浏览器显示的结果是:
ASP调用有关问题
求各位大神帮我一下,急!!!
[解决办法]
引用:
Quote: 引用:

<input type="submit" name="Submit" value="提交" /> 

我file1里面有这段代码啊!!!
我有点看不懂??????

另外一篇帖子 版主已经给你答案了

热点排行