⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 functions.asp

📁 jsp数字点卡在线销售系统谁都可以下载
💻 ASP
字号:
<script language="javascript1.2" Runat=Server>
function Ubb(strtemp) {
strtemp = strtemp.replace(/\r/ig, "");
strtemp = strtemp.replace(/\n/ig, "<BR>");
return strtemp;
}

function Ubbcode(strtemp) {
strtemp = strtemp.replace(/\r/ig, "");
// strtemp = strtemp.replace(/\r\n/ig, "<BR> ");
// strtemp = strtemp.replace(/\n\r\n/ig, "<P>");
// strtemp = strtemp.replace(/\n/ig, "<BR>");
strtemp = strtemp.replace(/\n/ig, "");
strtemp = strtemp.replace(/(^|\s)(http|https|ftp)(:\/\/[^\";,<>]+)/ig, "<a href=\"$2$3\" target=_blank class=sy>$2$3</a>");
strtemp = strtemp.replace(/([^\//]])(www\.[^\";,<>]+)/ig, "<a href=\"http:\/\/$2\" target=_blank class=sy>$2</a>");
strtemp = strtemp.replace(/(^|\s)(www\.[^\";,<>&]+)/ig, "<a href=\"http:\/\/$2\" target=_blank class=sy>$2</a>");
strtemp = strtemp.replace(/(\[URL\])(http|https|ftp)(:\/\/[^\[]*)(\[\/URL\])/ig, "<A HREF=\"$2$3\" TARGET=_blank class=sy>$2$3</A>");
strtemp = strtemp.replace(/(\[URL\])([^\[]*)(\[\/URL\])/ig, " <A HREF=\"http:\/\/$2\" TARGET=_blank class=sy>$2</A>");
strtemp = strtemp.replace(/(\[URL=)(http|https|ftp)(:\/\/[^\[]*)(\])([^\[]*)(\[\/URL\])/ig, "<A HREF=\"$2$3\" TARGET=_blank class=sy>$5</A>");
strtemp = strtemp.replace(/(\[URL=)([^\[]*)(\])([^\[]*)(\[\/URL\])/ig, "<A HREF=\"http:\/\/$2\" TARGET=_blank class=sy>$4</A>");
strtemp = strtemp.replace(/(\[code\])([^\[]*)(\[\/code\])/ig, "<BR><BLOCKQUOTE><strong>Code</strong>:<HR Size=1>$2<HR SIZE=1><\/BLOCKQUOTE>");
strtemp = strtemp.replace(/(\[COLOR=)([^\[]*)(\])([^\[]*)(\[\/COLOR\])/ig, "<FONT COLOR=\"$2\">$4<\/FONT>");
strtemp = strtemp.replace(/(\[FACE=)([^\[]*)(\])([^\[]*)(\[\/FACE\])/ig, "<FONT FACE=\"$2\">$4<\/FONT>");
strtemp = strtemp.replace(/(\[SIZE=)([^\[]*)(\])([^\[]*)(\[\/SIZE\])/ig, "<FONT SIZE=\"$2\">$4<\/FONT>");
strtemp = strtemp.replace(/(\[list\])([^\[]*)(\[\/list\])/ig, "<UL>$2<\/UL>");
strtemp = strtemp.replace(/(\[list=1\])([^\[]*)(\[\/list\])/ig, "<ol type=1>$2<\/ol id=1>");
strtemp = strtemp.replace(/(\[list=A\])([^\[]*)(\[\/list\])/ig, "<ol type=A>$2<\/ol id=A>");
strtemp = strtemp.replace(/(\[i\])([^\[]*)(\[\/i\])/ig, "<I>$2<\/I>");
strtemp = strtemp.replace(/(\[\*\])([^\[]*)(\[\/\*\])/ig, "<LI>$2<\/LI>");
strtemp = strtemp.replace(/(\[b\])([^\[]*)(\[\/b\])/ig, "<b>$2</b>");
// strtemp = strtemp.replace(/(\w+\@\w+.[\w.]+)/ig, "<a href=\"mailto:$1\" class=sy>$1</a>");
strtemp = strtemp.replace(/(\[IMG=)([^\[]*)(\])([^\[]*)(\[\/IMG\])/ig, "<IMG SRC=\"$2\" ALT=\"$4\">");
strtemp = strtemp.replace(/(\[IMG\])([^\[]*)(\[\/IMG\])/ig, "<IMG SRC=\"$2\">");
strtemp = strtemp.replace(/(\[EMAIL=)([^\[]*)(\])([^\[]*)(\[\/EMAIL\])/ig, "<A HREF=\"mailto:$2\" class=sy>$4<\/A>");
strtemp = strtemp.replace(/(\[EMAIL])([^\[]*)(\[\/EMAIL\])/ig, "<A HREF=\"mailto:$2\">$2<\/A>");
strtemp = strtemp.replace(/(\[U])([^\[]*)(\[\/U\])/ig, "<U>$2<\/U>");
strtemp = strtemp.replace(/(\[FLY])([^\[]*)(\[\/FLY])/ig, "<marquee width=90% behavior=alternate scrollamount=3>$2<\/marquee>");
strtemp = strtemp.replace(/(\[MOVE])([^\[]*)(\[\/MOVE])/ig, "<marquee scrollamount=3>$2<\/marquee>");
strtemp = strtemp.replace(/(\[QUOTE\])([^\[]*)(\[\/QUOTE\])/ig, "<BR><BLOCKQUOTE><strong>引用<\/strong>:<HR Size=1>$2<HR SIZE=1><\/BLOCKQUOTE>");
return strtemp;
}

function unUbbcode(strtemp){
strtemp = strtemp.replace(/<br>/ig, "\n");
strtemp = strtemp.replace(/<p>/ig, "\n\r\n");
strtemp = strtemp.replace(/""/ig, "\r");
strtemp = strtemp.replace(/<B>([^\[]*)<\/B>/ig, "\[B\]$1\[\/B\]");
strtemp = strtemp.replace(/<I>([^\[]*)<\/I>/ig, "\[I\]$1\[\/I\]");
strtemp = strtemp.replace(/<U>([^\[]*)<\/U>/ig, "\[U\]$1\[\/U\]");
strtemp = strtemp.replace(/<marquee scrollamount=3>([^\[]*)<\/marquee>/ig, "\[MOVE\]$1\[\/MOVE\]");
strtemp = strtemp.replace(/<BR><BLOCKQUOTE><strong>([^\[]*)<\/strong>:<HR Size=1>$2<HR SIZE=1><\/BLOCKQUOTE>/ig, "\[QUOTE\]$1\[\/QUOTE\]");
strtemp = strtemp.replace(/<marquee width=90% behavior=alternate scrollamount=3>([^\[]*)<\/marquee>/ig, "\[FLY\]$1\[\/FLY\]");
strtemp = strtemp.replace(/<LIST>([^\[]*)<\/LIST>/ig, "\[LIST\]$1\[\/LIST\]");
strtemp = strtemp.replace(/<ol type=1>([^\[]*)<\/ol id=1>/ig, "\[LIST=1\]$1\[\/LIST\]");
strtemp = strtemp.replace(/<ol type=A>([^\[]*)<\/ol id=A>/ig, "\[LIST=A\]$1\[\/LIST\]");
strtemp = strtemp.replace(/<LI>([^\[]*)<\/LI>/ig, "\[\*\]$1\[\/\*\]");
strtemp = strtemp.replace(/&lt;/ig, "<");
strtemp = strtemp.replace(/&gt;/ig, ">");
return strtemp;
}

function formation(strtemp){
strtemp = strtemp.replace(/"/ig, "\\\"");
return strtemp;
}

</script>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -