📄 ybbcode.asp
字号:
<%
sub smilies(temp)
if Request("smilies")="" then
temp =replace(temp,"/:)","<IMG border=0 SRC="&cluburl&"/images/brow/regular_smile.gif>")
temp =replace(temp,"/:d","<IMG border=0 SRC="&cluburl&"/images/brow/teeth_smile.gif>")
temp =replace(temp,"/:o","<IMG border=0 SRC="&cluburl&"/images/brow/omg_smile.gif>")
temp =replace(temp,"/:p","<IMG border=0 SRC="&cluburl&"/images/brow/tounge_smile.gif>")
temp =replace(temp,"/;)","<IMG border=0 SRC="&cluburl&"/images/brow/wink_smile.gif>")
temp =replace(temp,"/:(","<IMG border=0 SRC="&cluburl&"/images/brow/sad_smile.gif>")
temp =replace(temp,"/:s","<IMG border=0 SRC="&cluburl&"/images/brow/confused_smile.gif>")
temp =replace(temp,"/:|","<IMG border=0 SRC="&cluburl&"/images/brow/whatchutalkingabout_smile.gif>")
temp =replace(temp,"/:$","<IMG border=0 SRC="&cluburl&"/images/brow/embaressed_smile.gif>")
content=temp
end if
end sub
%>
<Script Language=JScript Runat=Server>
function ybbcode(temp) {
//自动识别网址
temp = temp.replace(/&/ig,"&");
temp = temp.replace(/^((http|ftp|rtsp|mms):(\/\/|\\\\)[A-Za-z0-9/\.\-_?=&:@%]+)/ig,"<A TARGET=_blank HREF=\"$1\">$1</A>");
temp = temp.replace(/( |<br>)((http|ftp|rtsp|mms):(\/\/|\\\\)[A-Za-z0-9/\.\-_?=&:@%]+)(| |<br>)/ig,"$1<A TARGET=_blank HREF=\"$2\">$2</A>$5");
temp = temp.replace(/(\[IMG\])(http:\/\/.[^\[]*)(\[\/IMG\])/ig,"<img border=0 src=$2 onload=\"javascript:if(this.width>560)this.width=560\">");
temp = temp.replace(/(\[FLASH\])(http:\/\/.[^\[]*)(\[\/FLASH\])/ig,"<embed src=$2 width=560 height=420>");
temp = temp.replace(/(\[b\])(.[^\[]*)(\[\/b\])/ig,"<b>$2<\/b>");
temp = temp.replace(/(\[i\])(.[^\[]*)(\[\/i\])/ig,"<I>$2<\/I>");
temp = temp.replace(/(\[u\])(.[^\[]*)(\[\/u\])/ig,"<u>$2<\/u>");
temp = temp.replace(/(\[strike\])(.[^\[]*)(\[\/strike\])/ig,"<strike>$2<\/strike>");
temp = temp.replace(/(\[center\])(.[^\[]*)(\[\/center\])/ig,"<center>$2<\/center>");
temp = temp.replace(/(\[marquee\])(.[^\[]*)(\[\/marquee\])/ig,"<marquee>$2<\/marquee>");
temp = temp.replace(/(\[URL\])((http|ftp|rtsp|mms):\/\/(.[^\[]*))(\[\/URL\])/ig,"<A TARGET=_blank HREF=\"$2\">$2</A>");
temp = temp.replace(/(\[URL=)((http|ftp|rtsp|mms):\/\/(.[^\[]*))(\])((.[^\[]*))(\[\/URL\])/ig,"<A TARGET=_blank HREF=\"$2\">$6</A>");
temp = temp.replace(/(\[EMAIL\])(\S+\@.[^\[]*)(\[\/EMAIL\])/ig,"<a href=mailto:$2>$2</a>");
temp = temp.replace(/(\[font=)(.[^.:;`'"=]*)(\])(.[^\[]*)(\[\/font\])/ig,"<FONT face=\"$2\">$4<\/FONT>");
temp = temp.replace(/(\[size=)(.[^.:;`'"=]*)(\])(.[^\[]*)(\[\/size\])/ig,"<FONT size=\"$2\">$4<\/FONT>");
temp = temp.replace(/(\[COLOR=)(.[^.:;`'"=]*)(\])(.[^\[]*)(\[\/COLOR\])/ig,"<FONT COLOR=\"$2\">$4<\/FONT>");
temp = temp.replace(/(\[code\])(.[^\[]*)(\[\/code\])/ig,"<BLOCKQUOTE><strong>代码</strong>:<HR Size=1>$2<HR SIZE=1><\/BLOCKQUOTE>");
temp = temp.replace(/(\[QUOTE\])(.[^\[]*)(\[\/QUOTE\])/ig,"<BLOCKQUOTE><strong>引用</strong>:<HR Size=1>$2<HR SIZE=1><\/BLOCKQUOTE>");
return (temp);
}
</Script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -