网络编程 
首页 > 网络编程 > 浏览文章

支持加号空格的查询

(编辑:jimmy 日期: 2024/9/20 浏览:3 次 )
复制代码 代码如下:
<%
Response.write "关键字:("&trim(request("Q"))&")"&"<hr>"
x=Replace(trim(request("Q"))," ",",")
'x=array(x)
t=split(x,",")
SQL="Select * From TB where kis<>0"
for i=0 to UBound(t)
if t(i)<>"" then
Response.write "第"&i+1&":"&t(i)&"<hr>"
SQL=SQL&" or title like '"&t(i)&"'"  '这个是关键
end if
next
Response.write SQL
%>
<Form action="">
<table>
<tr>
<td><Input Name="Q" onkeyup="this.value=this.value.replace(/\s+/g,' ')"><input type="submit" value="查
询"></td>
</tr>
</table>
</form>
上一篇:取得表单提交的所有数据
下一篇:实现支持逻辑搜索/单词搜索/词组搜索+支持OR/AND关键字的VBS CLASS!
友情链接:杰晶网络 DDR爱好者之家 南强小屋 黑松山资源网 白云城资源网 SiteMap