導航:首頁 > 凈水問答 > asp搜索過濾

asp搜索過濾

發布時間:2023-02-02 20:27:40

1. ASP中如何過濾指字文字前或指定文字後所有內容呢

可以用正則進行替換,例如以下代碼可以替換a及以後的內所有容字元
<%
str="1234agds34.32"
Dim regEx
Set regEx=new RegExp
regEx.pattern="a.*"
regEx.IgnoreCase =false
regEx.Global=True
str=regEx.Replace(str,"00000")
Response.Write "aaa="&str
%>

2. ASP如何過濾數組內重復內容

dim a(4)
a(0)=1
a(1)=1
a(2)=2
a(3)=2
a(4)=3
for n=0 to ubound(a)-1
for s=1 to ubound(a)

if a(s)=a(n) then
a(n)=""

end if
next

next
a_new=filter(a,"")『把a數組裡面是空值的全部刪掉,然後重新組合成一個a_new數組。
for n=0 to ubound(a_new)』列印出a_new數組。
response.write a_new(n)&"<br>"

next

說明:a_new是新生成的數組,去掉了a數組裡面被清空的那些,重新生成了一個開頭角標是0的a_new數組。

3. asp中如何過濾掉特殊字元

user=replace(trim(request.form("uName")),"'","''")
password=replace(trim(request.form("Password")),"'","''")
if instr(user,"%") or instr(user,"#") or instr(user,"?") or instr(user,"|") or instr(user,"'") then
response.write "<script language=javascript>alert('您的姓名含有非法字元!');this.location.href='login.asp';</script>"
response.end
end if

if instr(password,"%") or instr(password,"#") or instr(password,"?") or instr(password,"|") then
response.write "<script language=javascript>alert('您的密碼含有非法字元!');this.location.href='login.asp';</script>"
response.end
end if 我自己做的,希望對你有幫助

閱讀全文

與asp搜索過濾相關的資料

熱點內容
空間站凈水設備是什麼品牌 瀏覽:241
什麼電器有濾芯 瀏覽:515
下水道水垢清除 瀏覽:499
食用菌無菌空氣過濾器 瀏覽:705
電車電瓶用加蒸餾水嗎 瀏覽:934
大流量袋式過濾器生產基地 瀏覽:995
反滲透什麼情況下爆破膜爆破 瀏覽:37
國家生物污水排放標准 瀏覽:355
污水廠工程工藝流程 瀏覽:918
破碎錘帶回油濾芯干什麼用 瀏覽:541
金正立式飲水機怎麼清洗 瀏覽:548
java過濾換行符 瀏覽:199
飲水機裡面放出來的水特別臟怎麼辦 瀏覽:924
純水機拍出來的廢水 瀏覽:929
污水處理廠三年規劃目標 瀏覽:630
回收二手過濾機 瀏覽:155
大車濾芯怎麼賣 瀏覽:472
半透膜蔗糖和葡萄糖液面變化 瀏覽:1000
青島市生活污水氨氮吹脫塔哪裡有 瀏覽:775
用過的君子蘭土能否回用 瀏覽:417