值为什么不传递?
我的asp程序为什么不能把在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>
十万火急,请大家赐教,谢谢各位了!
问题点数:30、回复次数:6Top
1 楼BrentIvan(Ivan)回复于 2001-04-26 15:10:00 得分 30
meathod="post"
写错了
method="post"
如果写错了,form会按照默认的get方式提交参数Top
2 楼shockjoy(无聊死了)回复于 2001-04-26 15:44:00 得分 0
好像还是不行啊,还是传递空值。Top
3 楼shockjoy(无聊死了)回复于 2001-04-27 08:57:00 得分 0
谢谢各位了,问题解决了,但是怎么给分呢?Top
4 楼shockjoy(无聊死了)回复于 2001-04-27 08:59:00 得分 0
谢谢brentIvan大哥,问题解决,但是不知道怎么给分,请指教。Top
5 楼BrentIvan(Ivan)回复于 2001-04-27 09:04:00 得分 0
点帖子旁边的管理Top
6 楼shockjoy(无聊死了)回复于 2001-04-27 20:36:00 得分 0
还是不行啊Top




