• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • JavaScript
  • ASP.NET
  • PHP
  • 正则表达式
  • AJAX
  • JSP
  • ASP
  • Flex
  • XML
  • 编程技巧
  • Android
  • swift
  • C#教程
  • vb
  • vb.net
  • C语言
  • Java
  • Delphi
  • 易语言
  • vc/mfc
  • 嵌入式开发
  • 游戏开发
  • ios
  • 编程问答
  • 汇编语言
  • 微信小程序
  • 数据结构
  • OpenGL
  • 架构设计
  • qt
  • 微信公众号
您的位置:首页 > 程序设计 >ASP > 用asp实现网址和邮件地址的转换函数

用asp实现网址和邮件地址的转换函数

作者: 字体:[增加 减小] 来源:互联网 时间:2017-05-11

通过本文主要向大家介绍了asp发送邮件代码,asp发邮件,asp发送邮件,asp jmail发送邮件,asp 邮件等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
网址和邮件地址的转换函数
<%
function URLconvert(str) 
convertstr=str
urlLocation=instr(convertstr,"http://")

if (urlLocation=0) and (mailLocation=0) then 
URLconvert=convertstr
exit function
end if

if urlLocation<>0 then
rightstr=str
Do while urlLocation<>urlLocationend
urlLocation=instr(rightstr,"http://")
urlLocationend=InStrRev(rightstr,"http://")
finalstr=finalstr&left(rightstr,urlLocation-1)
midurlstr=mid(rightstr,urlLocation+1,1)
do while (asc(midurlstr)>=45) and (asc(midurlstr)<=126)
loopint=loopint+1
midurlstr=mid(rightstr,urlLocation+loopint,1)
if midurlstr="" then exit do
loop
endURLstr=mid(rightstr,urllocation,loopint)
URLstr="<a href="&endURLstr&">"&endURLstr&"</a>"
rightstr=mid(rightstr,urllocation+loopint)
finalstr=finalstr&URLstr
loopint=1
Loop 
end if
finalstr=finalstr&rightstr

convertstr1=finalstr
finalstr=""
mailLocation=instr(convertstr1,"@")
if mailLocation<>0 then
Do while mailLocation<>mailLocationend
mailLocation=instr(convertstr1,"@")
mailLocationend=InStrRev(convertstr1,"@")
mainmidmailstr=mid(convertstr1,mailLocation+1,1)
midmailstr=mainmidmailstr
do while (asc(midmailstr)>=45) and (asc(midmailstr)<=126)
loopint1=loopint1+1
midmailstr=mid(convertstr1,mailLocation-loopint1,1)
loop
firstSTR=mid(convertstr1,mailLocation-loopint1+1,loopint1-1)

finalstr=finalstr&left(convertstr1,mailLocation-loopint1)

midmailstr1=mainmidmailstr 
do while (asc(midmailstr1)>=45) and (asc(midmailstr1)<=126)
loopint2=loopint2+1
midmailstr1=mid(convertstr1,mailLocation+loopint2,1)
if midmailstr1="" then exit do
loop
secondSTR=mid(convertstr1,mailLocation,loopint2)

endmailstr=firstSTR&secondSTR
mailstr="<a href=mailto:"&endmailstr&">"&endmailstr&"</a>"
finalstr=finalstr&mailstr
convertstr1=mid(convertstr1,maillocation+loopint2)
loopint1=1
loopint2=1
Loop
end if
finalstr=finalstr&convertstr1
URLconvert=finalstr
end function
%>  </div>
分享到:QQ空间新浪微博腾讯微博微信百度贴吧QQ好友复制网址打印

您可能想查找下面的文章:

  • ASP中实现定时发送邮件的代码分享
  • 用asp实现网址和邮件地址的转换函数

相关文章

  • 2017-05-11SQL Server 存储过程的分页
  • 2017-05-11EasyASP v1.5发布(包含数据库操作类,原clsDbCtrl.asp)第1/2页
  • 2017-05-11独孤剑写的马克斯迅雷片库采集插件1.4 官方最新版提供下载了
  • 2017-05-11ReplaceTrim 函数之asp实现过滤掉字符中所有的tab和回车和换行的代码
  • 2017-05-11ASP中类Class相关内容的整理资料
  • 2017-05-11ASP中生成文本文件的两种方式
  • 2017-05-11asp下最常用的19个基本技巧第1/2页
  • 2017-05-11提供个 全免杀海洋2006asp木马 下载
  • 2017-05-11asp的通用数据分页类
  • 2017-05-11处理驱动器和文件夹

文章分类

  • JavaScript
  • ASP.NET
  • PHP
  • 正则表达式
  • AJAX
  • JSP
  • ASP
  • Flex
  • XML
  • 编程技巧
  • Android
  • swift
  • C#教程
  • vb
  • vb.net
  • C语言
  • Java
  • Delphi
  • 易语言
  • vc/mfc
  • 嵌入式开发
  • 游戏开发
  • ios
  • 编程问答
  • 汇编语言
  • 微信小程序
  • 数据结构
  • OpenGL
  • 架构设计
  • qt
  • 微信公众号

最近更新的内容

    • asp 中常用的文件处理函数
    • asp实现的7xi音乐网的采集源代码
    • 读取目录下的文件得到一个数组
    • 在JScript中使用缓存技术的实际代码
    • 叶子asp分页类
    • ASP智能搜索的实现
    • ASP的Error对象知识简析
    • ASP中FSO的神奇功能 - 用FSO进行内容管理
    • ASP 中 Split 函数的实例分析
    • 送给搞采集的兄弟一个sql语句

关于我们 - 联系我们 - 免责声明 - 网站地图

©2020-2025 All Rights Reserved. linkedu.com 版权所有