私は彼がZ-Blogに実行中のコード関数を追加するのを見ました。数日後、このようにアイドル状態にとどまると錆びるのではないかと心配しました。 1時間半後、実行中の機能もブログに追加しました。 Lブログから変更されたため、Lブログにも適しています。さらに、FBSはLブログからも変更されており、この記事のメソッドを使用して実行中のコード関数を追加する必要があります。さらに、コピーと保存コードには、各ブラウザと互換性のあるソリューションが見つからなかったため、追加されていません。
例:
手順は次のとおりです。
1. include/common.jsに次のコードを追加します。
コードコピーは次のとおりです。
functionRuncode(codeobjid){
varcodeobj = document.getElementById(codeobjid)
varcodestr = codeobj.value;
if(codestr!= ""){
varcodewin = window.open( ''、 ''、 '');
codewin.document.open( 'text/html'、 'eppled');
codewin.opener = null
codewin.document.write(codestr);
codewin.document.close();
}
}
2。Strcontent= re.replace(strcontent、 "【コード")をinclude/ubbcode.asp(change [】to [])in in fike and次のコードを追加します。
L-ブログ:
コードコピーは次のとおりです。
re.pattern = "/[html/](<br>)+"
strcontent = re.replace(strcontent、 "【html】")
FBS:
コードコピーは次のとおりです。
re.pattern = "/[html/](<br/>)+"
strcontent = re.replace(strcontent、 "【html】")
次に、re.pattern = "/[code/](.*?)/ [// code/]"を見つけてから、setStrMatchesの後に次のコードを追加します=セグメントコードはありません。
コードコピーは次のとおりです。
re.pattern = "/[html/](.* ?)/// html/]"
setStrMatches = re.execute(strcontent)
foreachstrmatchinstrmatches
rndstr = int(7999*rnd+2000)
tmpstr1 = strmatch.submatches(0)
strcontent = cheplage(strcontent、strmatch.value、 "<textarearows =" "" "" _
& "style =" "width:90%;" "class =" "input_border" "id =" "html _"&rndstr& "" ""> "_
&tmpstr1& "</textarea> <br/>" _
& "<inputtype =" "button" "onclick =" "runcode( 'html _"&rndstr& "');" value = "" runcode ""/> "_
&「[ctrl+aすべての選択プロンプト:最初にコードを変更してから、実行を押すことができます]))
次
SetStrMatches =何もない
3.変更が完了しました。ログを公開するときは、コードを使用して[/html]から[]([]を[]に置き換える)を実行して、実行中のコード関数を使用できます。