復制代碼 代碼如下:
<%
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>