随笔分类 -  asp

摘要:今天遇到这种问题,单纯的使用replace函数不行,他会改变原有的字符串的大小写在网上找到相关的代码,自己备份下普通的替换函数public function HighLight(S,F)dim tL,tM,tR,ktL=""tM=""tR=Sk=instr(1,tR,F,1)do while k>0tL=tL & left(tR,k-1)tM=mid(tR,k,len(F))tL=tL & "<span style='color:red'>" & tM & " 阅读全文
posted @ 2012-08-03 16:38 龙圆 阅读(480) 评论(0) 推荐(0)
摘要:'创建文件夹SubCreateAFolder(file)DimfsoSetfso=CreateObject("Scripting.FileSystemObject")fso.CreateFolder(file)response.write"已经建立了"&fileEndSub'删除文件夹SubDeleteAFolder(file)DimfsoSetfso=CreateObject("Scripting.FileSystemObject")fso.DeleteFolder(file)response.write&q 阅读全文
posted @ 2011-02-28 13:26 龙圆 阅读(7960) 评论(0) 推荐(0)
摘要://取得动态文件内容Title1FunctionGetHttpPage(HttpUrl,Coding)2OnErrorResumeNext3IfIsNull(HttpUrl)=TrueOrLen(HttpUrl)<18OrHttpUrl=""Then4GetHttpPage=""5ExitFunction6EndIf7DimHttp8SetHttp=Server.CreateObject("MSXML2.XMLHTTP")9Http.Open"GET",HttpUrl,False10Http.Send11If 阅读全文
posted @ 2011-02-24 16:49 龙圆 阅读(585) 评论(0) 推荐(0)
摘要:获取是什么浏览器<script>getOs();function getOs() { var OsObject = ""; if(navigator.userAgent.indexOf("MSIE")>0) { //ie document.getElementById('selectpic').src="http://www.bioon.com.cn/images/2010/ie.gif"; document.getElementById('selectpic').title=&quo 阅读全文
posted @ 2011-02-23 11:07 龙圆 阅读(294) 评论(0) 推荐(0)
摘要:验证guid()类型值的函数Function IsGUID(expression)'********************************************'函数名:IsGUID'作 用:检查guid()合法性'参 数:expression ----要检查的guid()'返回值:True ----guid()合法' False ----guid()不合法'******************************************** if not(IsNull(expression)) then Set guidRegEx = new RegexpguidRegEx. 阅读全文
posted @ 2010-12-06 10:44 龙圆 阅读(527) 评论(0) 推荐(0)
摘要:<script type="text/javascript" src="js/jQuery-1.3.2.js"></script> <script type="text/javascript" src="js/jquery.krater.js"></script> <script type="text/javascript"> $(fun... 阅读全文
posted @ 2010-11-12 13:17 龙圆 阅读(252) 评论(0) 推荐(0)
摘要:function GetSheetNames(sWorkbook) Dim objConn,objCat,tbl,iRow,sConnString,sTableName ,dotpos 'sWorkbook工作簿名称及路径. sConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & sWorkbook & ";E... 阅读全文
posted @ 2010-11-12 13:16 龙圆 阅读(320) 评论(0) 推荐(0)
摘要:1.服务器端缓存 ListBox=Application("ListBox") If ListBox<>"" then Response.Write "本次通过服务器缓存读取数据:<BR>" End If If ListBox="" then Response.Write "本次为第一次读取数据,从数据库中读取:<BR>" Response.Write "另外打... 阅读全文
posted @ 2010-10-17 15:45 龙圆 阅读(458) 评论(0) 推荐(0)
摘要:剔除页面中html中除文字以外的任何代码<%Function RemoveHTML(str)Dim objRegExp, Match,strHTMLif isnull(str) thenstr=""end ifstrHTML=strstrHTML=replace(replace(replace(strHTML,vblf,""),vbcr,""),vbcrlf,"")Set objRegExp... 阅读全文
posted @ 2010-09-29 17:54 龙圆 阅读(490) 评论(0) 推荐(0)
摘要:<%'================================================' 显示解释函数,返回根据参数允许显示的格式字符串,具体调用方法可从后台管理获得' 输入参数:' s_Content : 要转换的数据字符串' s_Filters : 要过滤掉的格式集,用逗号分隔多个'=============================================... 阅读全文
posted @ 2010-09-29 14:33 龙圆 阅读(279) 评论(0) 推荐(0)
摘要:最近要写这种程序,在网上找到这个很棒的代码,转载过来看看http://www.cnsdn.com.cn/blog/trackback.asp?tbID=2002&action=addtb&tbKey=35447f54e91ce5005added3772f5bb6eed60f97e 阅读全文
posted @ 2010-09-14 17:48 龙圆 阅读(557) 评论(0) 推荐(0)
摘要:Response.ExpiresAbsolute =Now() - 1Response.Expires=0Response.CacheControl="no-cache"ajax强制不缓存的方法1、加个随机数 xmlHttp.open("GET", "ajax.asp?now=" + new Date().getTime(), true);2、在要异步获取的asp页面中写一段禁止缓存的代码: ... 阅读全文
posted @ 2010-09-03 15:08 龙圆 阅读(3551) 评论(0) 推荐(0)
摘要:在线发送邮件1、jmail发送邮件要做在线发邮件首先要该服务器支持jamil组件(现在的空间商基本上都支持),如果在自己机子上测试的 时候到网上去找个jmail安装一个就行了,记住本程序只适用于4.2以后的版本! <%domain = "smtp.163.com"ename=request.form("name")email=request.form("email")subject=requ... 阅读全文
posted @ 2010-08-26 13:03 龙圆 阅读(1483) 评论(0) 推荐(1)