?? reply.js
字號(hào):
var Web767_filterScript = true;
var Web767_charset="UTF-8";
var Web767_bLoad=false
var Web767_bTextMode=3;
//var Web767_bIsIE5=document.all
//if (Web767_bIsIE5)
//{var IframeID=frames["Web767_Composition"];}
//else
//{
//var IframeID=document.getElementById("Web767_Composition").contentWindow;
//}
//Web767_InitDocument('Body','gb2312')
function Web767_InitDocument(hiddenid, charset)
{
//myform
if (charset!=null){Web767_charset=charset;}
if (Web767_bIsIE5){
var Web767_bodyTag="<style type=text/css>.quote{margin:5px 20px;border:1px solid #CCCCCC;padding:5px; background:#F3F3F3 }\nbody{boder:0px}.HtmlCode{margin:5px 20px;border:1px solid #CCCCCC;padding:5px;background:#FDFDDF;font-size:14px;font-family:Tahoma;font-style : oblique;line-height : normal ;font-weight:bold;}\nbody{boder:0px}</style></head><BODY bgcolor=\"#FFFFFF\" title=\"Ctrl+Enter直接提交\" onkeydown=\"ctlent();\">";
}else
{
var Web767_bodyTag="<style type=text/css>.quote{margin:5px 20px;border:1px solid #CCCCCC;padding:5px; background:#F3F3F3 }\nbody{boder:0px}.HtmlCode{margin:5px 20px;border:1px solid #CCCCCC;padding:5px;background:#FDFDDF;font-size:14px;font-family:Tahoma;font-style : oblique;line-height : normal ;font-weight:bold;}\nbody{boder:0px}</style></head><BODY bgcolor=\"#FFFFFF\" >";
}
var editor=IframeID
var h=document.getElementById(hiddenid).value;
if (navigator.appVersion.indexOf("MSIE 6.0",0)==-1){
editor.document.designMode="On"
}
editor.document.open();
editor.document.write ('<html><head>');
if (Web767_bIsIE5){
editor.document.write ('<script language="javascript">');
editor.document.write ('var ispost=0;');
editor.document.write (' function ctlent()');
editor.document.write (' {');
editor.document.write (' if(event.ctrlKey && window.event.keyCode==13&&ispost==0)');
editor.document.write (' {');
editor.document.write (' ispost=1;');
editor.document.write (' parent.Web767_CopyData("'+hiddenid+'"); ');
editor.document.write (' parent.document.myform.submit();');
editor.document.write (' }');
editor.document.write (' }');
editor.document.write ('<\/script>');
}
editor.document.write(Web767_bodyTag);
if (h!="")
{
h=Web767_FilterScript(h);
editor.document.write(h);
}
editor.document.write ("</body>");
editor.document.write ("</html>");
editor.document.close();
editor.document.body.contentEditable = "True";
editor.document.charset=Web767_charset;
Web767_bLoad=true;
Web767_setStyle();
}
function Web767_setStyle()
{
//var bs = IframeID.document.body.runtimeStyle;
var bs = IframeID.document.body.style;
//根據(jù)mode設(shè)置iframe樣式表
if (Web767_bTextMode==2) {
bs.fontFamily="Arial";
bs.fontSize="10pt";
}else{
bs.fontFamily="Arial";
bs.fontSize="10.5pt";
}
bs.scrollbar3dLightColor= '#D4D0C8';
bs.scrollbarArrowColor= '#000000';
bs.scrollbarBaseColor= '#D4D0C8';
bs.scrollbarDarkShadowColor= '#D4D0C8';
bs.scrollbarFaceColor= '#D4D0C8';
bs.scrollbarHighlightColor= '#808080';
bs.scrollbarShadowColor= '#808080';
bs.scrollbarTrackColor= '#D4D0C8';
bs.border='1';
}
function Web767_CopyData(hiddenid)
{
if (Web767_bTextMode==2)
{
cont=IframeID.document.body.innerText;
}else{
cont=IframeID.document.body.innerHTML;
}
var ChekEmptyCode=Web767_ChekEmptyCode(cont);
if (ChekEmptyCode=='' || ChekEmptyCode==null)
{
cont='';
}
else{
cont=Web767_correctUrl(cont);
if (Web767_filterScript)
cont=Web767_FilterScript(cont);
}
document.getElementById(hiddenid).value = cont;
}
//格式化鏈接
function Web767_correctUrl(cont)
{
var url=location.href.substring(0,location.href.lastIndexOf("/")+1);
cont=Web767_rCode(cont,location.href+"#","#");
//cont=Web767_rCode(cont,url,"");
var regExp = /<(a[^>]*) href=([^ |>]*)([^>]*)/gi
cont = cont.replace(regExp, "<$1 href=$2 target=\"_blank\" ") ;
return cont;
}
function Web767_FilterScript(content)
{
content = Web767_rCode(content, 'javascript:', '<b>javascript</b> :');
var RegExp = /<script[^>]*>(.*)<\/script>/ig;
content = content.replace(RegExp, "<div class=HtmlCode><!-- Script 代碼開(kāi)始 --><br>$1<br><!-- Script 代碼結(jié)束 --></div>");
return content;
}
function Web767_rCode(s,a,b,i){
//s原字串,a要換掉pattern,b換成字串,i是否區(qū)分大小寫(xiě)
a = a.replace("?","\\?");
if (i==null)
{
var r = new RegExp(a,"gi");
}else if (i) {
var r = new RegExp(a,"g");
}
else{
var r = new RegExp(a,"gi");
}
return s.replace(r,b);
}
function Web767_ChekEmptyCode(html) {
//html = html.replace(/ |<|>/gi, "");
html = html.replace(/\<[^>]*>/g,""); ///過(guò)濾其它所有"<...>"標(biāo)簽
html = html.replace(/ /gi, "");
html = html.replace(/o:/gi, "");
html = html.replace(/\s/gi, "");
return html;
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -