asp站内查询

来源:百度知道 编辑:UC知道 时间:2024/06/15 14:20:43
这是查询表单代码<form action="Product_Search.asp" method="post" name="form2" onSubmit="return checkit();">

<tr>
<td width="41%" align="left"><input name="keyword" type="text" size="16" class="border2" style="width:124;height:21;" align="absmiddle"></td>
<td width="39%" align="left"><button class="btn" type="submit"><b>Search</b></button></td>
</tr>
</form>
Product_Search.asp代码
<%PageType = "Product"%>
<!--#include file="top.asp"-->
<%
ParentID = CheckNum(Request("parentID"))
keyword = CheckStr(trim(Request("keyword")))

Cname = "产品搜索"

Dim PageSize,PageCount,RecordCount,CurPage
PageSize = 6<

sql = "select * from product where Name like '%" & Keyword & "%' Or Intro like '%" & Keyword & "%' Order By PID Desc"
end if
RS.open sql,ConnProd,1,1
你只打开并没有提取数据库表里的内容 你准备叫它显示什么?

如果是正常的表单是可以提交的,你这里不能提交,就先检查代码的完整性吧,然后你的js如果有错也是不能提交到下一页的,你检查一下看JS代码部分有没有报错!

onSubmit="return checkit();">

这个函数有问题