您的位置:首页 > 其它

支持加号空格的查询

2006-08-25 00:00 344 查看
<% 
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>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐