ASP是代替CGI腳本程序的應用,是簡單、方便的編程工具,想必不少朋友們對於ASP還不是很了解,那麼我們現在去看看asp下常用的代碼介紹,想了解的朋友們一起來看看吧。
點擊提示“確定”與“取消”提示框
onclick='{if(confirm("您確定刪除嗎?此操作將不能恢復!")){return true;}return false;}'
刪除.LDB文件
<%
Application.Contents.Removeall()
%>
將HTML格式轉換為純文本格式
<%
Function RemoveHTML(strHTML)
Dim objRegExp, Match, Matches
Set objRegExp = New Regexp
objRegExp.IgnoreCase = True
objRegExp.Global = True
'取閉合的<>
objRegExp.Pattern = "<.+?>"
'進行匹配
Set Matches = objRegExp.Execute(strHTML)
' 遍歷匹配集合,並替換掉匹配的項目
For Each Match in Matches
strHtml=Replace(strHTML,Match.Value,"")
Next
RemoveHTML=strHTML
Set objRegExp = Nothing
End Function
%>
調用
<%=RemoveHTML(你的字段)%>
25、當前頁地址
<%
response.write "http://"&Request.ServerVariables("server_name")&Request.ServerVariables("script_name")
%>
asp下常用的代碼介紹就介紹到這裡了,相信大家都有了一定的了解,想要了解更多的技術信息,請繼續關注錯新技術頻道吧!