¡¡¡¡Èç¹ûÓû§ÊäÈëÁËhttp://aaa.bbb.ccc
ÏÂÃæÕâ¸ö´úÂ뽫°ÑËûµÄÊäÈëת»»³Éhttp://aaa.bbb.ccc
´ó¼Ò¿´¿´ÕýÔò±í´ïʽÓжàÀ÷º¦£¬ºÇºÇ¡£
<%
'µ÷ÓÃÕâ¸öº¯ÊýÀ´ÏÔʾ³É³¬Áª½á
Response.Write to_html(s_message)
%>
<%
Function to_html(s_string)
to_html = Replace(s_string, """", """)
to_html = Replace(to_html, "<", "<")
to_html = Replace(to_html, ">", ">")
to_html = Replace(to_html, vbcrlf, "
")
to_html = Replace(to_html, "/<", "<")
to_html = Replace(to_html, "/>", ">")
to_html = edit_hrefs(to_html)
End Function
%>
function edit_hrefs(s_html){
// Ò»¸öʹÓÃÕýÔò±í´ïʽµÄµä·¶
// ת»»Îı¾ÖÐËùÓеij¬Áª½áºÍµç×ÓÓʼþ¸ñʽ
s_str = new String(s_html);
s_str = s_str.replace(/\bhttp\:\/\/www(\.[\w+\.\:\/\_]+)/gi,
"http\:\/\/¬¡è¸$1");
s_str = s_str.replace(/\b(http\:\/\/\w+\.[\w+\.\:\/\_]+)/gi,
s_str = s_str.replace(/\b(www\.[\w+\.\:\/\_]+)/gi,
"$1");
s_str = s_str.replace(/\bhttp\:\/\/¬¡è¸(\.[\w+\.\:\/\_]+)/gi,
"http\:\/\/www$1");
s_str = s_str.replace(/\b(\w+@[\w+\.?]*)/gi,
"$1");
return s_str;
}

