ASP

今天一天写了几个函数

'***********************************************

'函数名:alerturl

'作 用:提示信息

'参 数:str—-提示信息,url—–放的网址

'返回值:一个信息,回到网站

'***********************************************

function alerturl(str,url)

response.Write("<script>alert("""&str&""");window.document.location.href='"&url&"';</script>")

end function

'***********************************************

'函数名:trimchr

'作 用:把双引号转换成单引号放在主要在网站配置方面

'参 数:trimstrchr—-被引入的字符

'返回值:过滤掉chr(34)的字符

'***********************************************

function trimchr(trimstrchr)

if trimstrchr="" then

exit function

end if

trimchr=replace(trim(trimstrchr),chr(34),chr(39))

end Function

'***********************************************

'函数名:brtochr

'作 用:把vbcrlf转换成<br>,

'参 数:chrstr—-这个是字符串

'返回值:字符串

'***********************************************

function chrtobr(chrstr)

if chrstr="" then

exit function

end if

chrtobr=replace(chrstr,vbcrlf,"[br]")

end Function

'***********************************************

'函数名:brtochr

'作 用:把[br]转换成chr(10)

'参 数:brstr—-这个是字符串

'返回值:字符串

'***********************************************

function brtochr(brstr)

if brstr="" then

exit function

end if

brtochr=replace(brstr,"[br]",chr(10))

end Function

'***********************************************

'函数名:tobr

'作 用:把|转换成<br>

'参 数:strbr—-这个是字符串

'返回值:字符串

'***********************************************

function tobr(strbr)

if strbr="" then

exit function

end if

tobr=replace(strbr,"|","<br>")

end Function

%>

Function selectstr(myint1,myint2,daystr)

do while myint1<=myint2

selectstr= ""&myint1&""&chr(10)

if myint1=daystr then

selectstr= ""&myint1&""&chr(10)

else

selectstr= ""&myint1&""&chr(10)

end if

if myint1=myint2 then exit do

response.Write selectstr

myint1=myint1+1

loop

end Function

分类: ASP

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理

相关文章

开始在上面输入您的搜索词,然后按回车进行搜索。按ESC取消。

返回顶部