CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
山寨机中的战斗机! 程序优化工程师到底对IT界有没有贡献
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  Web 开发 >  JavaScript

为什么错了?求解

楼主guokunh()2004-05-03 22:36:15 在 Web 开发 / JavaScript 提问

<Script   Language="JScript"   Runat=Server>  
  $UBBCode   =   0                               //   打开或关闭UBB代码功能.1(关闭).0(打开)  
  function   Autolink(temp)   {  
                    temp=patch(temp);  
                  if   (!$UBBCode){   //   UBB   代码的支持,这里仅仅提供了一些常用的代码。  
                          temp   =   temp.replace(/(^|\s)(http|https|ftp)(:\/\/[^\";,<>]+)/ig,   "<a   href=\"$2$3\"   target=_blank>$2$3</a>");  
                          temp   =   temp.replace(/([^\//]])(www\.[^\";,<>]+)/ig,   "<a   href=\"http:\/\/$2\"   target=_blank>$2</a>");  
                          temp   =   temp.replace(/(^|\s)(www\.[^\";,<>&]+)/ig,   "<a   href=\"http:\/\/$2\"   target=_blank>$2</a>");  
                                  temp   =   temp.replace(/(\[URL\])(http|https|ftp)(:\/\/\S+)(\[\/URL\])/ig,   "<A   HREF=\"$2$3\"   TARGET=_blank>$2$3</A>");  
                                  temp   =   temp.replace(/(\[URL\])(\S+)(\[\/URL\])/ig,   "   <A   HREF=\"http:\/\/$2\"   TARGET=_blank>$2</A>");  
                                  temp   =   temp.replace(/(\[URL=)(http|https|ftp)(:\/\/\S+)(\])(.+)(\[\/URL\])/ig,   "<A   HREF=\"$2$3\"   TARGET=_blank>$5</A>");  
                                  temp   =   temp.replace(/(\[email=)(\S+)(\])(.+)(\[\/email\])/ig,   "<A   HREF=\"mailto:\$2\">$4</A>");  
                          temp   =   temp.replace(/(\[email\])(\S+)(\[\/email\])/ig,   "<A   HREF=\"mailto:\$2\">$2</A>");  
                                  temp   =   temp.replace(/(\[URL=)(\S+)(\])(.+)(\[\/URL\])/ig,   "<a   href=\"http:\/\/$2\"   TARGET=_blank>$4</A>");  
                          temp   =   temp.replace(/(\[sound\])(\S+)(\[\/sound\])/ig,   "<bgsound   src=\"$2\"   loop=-1   >");  
                                  temp   =   temp.replace(/(\[size=)(\S+)(\])(.+)(\[\/size\])/ig,   "<font   size=\"$2\">$4<\/font>");                      
                          temp   =   temp.replace(/(\[img\])(\S+)(\[\/img\])/ig,   "<img   src=\"$2\"   alt=\"$2\">");  
  temp   =   temp.replace(/(\[e\])(\S+)(\[\/e\])/g,   "<img   src=\"$2\"   alt=\"$2\">");  
                  }  
  return   (temp);  
  }  
  function   patch(temp)   {  
                  temp   =   temp.replace(/</ig,   "&lt;");  
                  temp   =   temp.replace(/>/ig,   "&gt;");  
                  temp   =   temp.replace(/\r\n/ig,   "<BR>   ");  
                  temp   =   temp.replace(/\n\r\n/ig,   "<P>");  
                  temp   =   temp.replace(/\n/ig,   "<BR>");  
                  temp   =   temp.replace(/\r/ig,   "");  
  return   (temp);  
  }  
  </Script>  
  为什么一个[e]1[/e]的时候好用   但是   [e]1[/e][e]1[/e]却不好用了    
   
  什么原因?  
   
  问题点数:0、回复次数:0Top

相关问题

  • 在线高分求解。为什么会出错,线程问题
  • 高分求解?为什么我调用JOptionPane类会出错!
  • 800a000d错误,求解!
  • 求解CS1501错误?
  • 重分求解,为什么我碰见的错误都这么奇怪呀?
  • [高分求解]用weblogic7做服务器,老出错,为什么-两个问题?
  • 80040e10错误,求解答!
  • LNK2001错误(500分求解)
  • 编译错误求解!急
  • ASSERT 错误,请求解答

关键词

得分解答快速导航

  • 帖主:guokunh

相关链接

  • Web开发类图书

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
北京创新乐知广告有限公司 版权所有, 京 ICP 证 070598 号
世纪乐知(北京)网络技术有限公司 提供技术支持
Copyright © 2000-2008, CSDN.NET, All Rights Reserved
GongshangLogo