十万火急,那位大哥帮帮小弟,我先谢了!值为什么不能传递?
我在htm文件中输入的值为什么传到asp文件中去都为空呢?传递的是字符,但传过去都是""
html文件:<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>类别</title>
</head>
<body>
<form action="query.asp" style="COLOR: midnightblue" meathod="post" >
<p>类别:<select size="1" name="leibie">
<option value="my" selected>my</option>
<option value="ly">ly</option>
<option value="xx">xx</option>
</select><input type="submit" value="查询" ></p>
</form>
</body>
</html>
asp文件:<% @ LANGUAGE=VBscript%>
<html><head><title>查询结果</title></head>
<body>
<h1>人员资料<h1>
<hr>
<%
strname=request.form("leibie")
'if strname<>"" then
'response.write "strname"
'end if
strSQL="select * from xx where xm like'%"&trim(strname)&"%'"
conn="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\zhaopin\db1.mdb"
set cn=server.createobject("ADODB.Connection")
cn.open conn
set rst=Server.CreateObject("ADODB.Recordset")
rst.open strSQL,cn
RESPONSE.write"<table border cellspacing=1 cellpadding=7>"&"<tr height=10><td width=40><b> 姓名</b></td>"&"<td width=40><b>性别</b></td>"&"<td width=40><b>年龄</b></td>"&"<td width=150><b>毕业院校</b></td></tr>"
do until rst.eof
RESPONSE.write"<tr height=12><td width=60>"& rst.fields("xm")&"</td>"&"<td width=50>" & rst.fields("xb") & "</td>"&"<td width=50>" & rst.fields("nl") & "</td>"&"<td width=170>" & rst.fields("byyx") & "</td></tr>"
rst.movenext
loop
response.write"</table>"
rst.close
cn.close
%>
<hr>
</body></html>
十万火急,那位大哥帮帮小弟,我先谢了!