ASP中关于加号空格查询代码怎么写
来源:爱站网时间:2022-01-27编辑:网友分享
ASP中关于加号空格查询代码怎么写?关于这个问题你知道怎么处理比较好吗,爱站技术频道网站小编为此整理了相关资料,如果有需要,可以自行翻看查阅。
复制代码 代码如下:
<%
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>
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>
以上就是ASP中关于加号空格查询代码怎么写的详细内容了,还有哪些方面不懂的吗?来爱站技术频道网站留言,带你了解不一样的技术资讯。
下一篇:ASP编程中的一些操作类型介绍