页面导航: 首页网络编程ASP编程应用技巧 → 正文内容 asp下经常用到的代码

asp下经常用到的代码

发布:dxy 发布日期:2008-1-9 13:45:45 字体:[增加 减小] 类型:转载
点击提示“确定”与“取消”提示框,主要用于删除确认
点击提示“确定”与“取消”提示框
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") 
%>
Tags:asp 常用代码
百度中搜索更多的关于asp下经常用到的代码内容,或者用Google搜索相关更多
浏览次数:载入中... 打印本文关闭本文返回首页

文章评论

共有 位脚本之家网友发表了评论我来说两句

同 类 文 章
最 近 更 新
热 点 排 行