看到他加入到Z-Blog操作码在僧侣的功能,几天下来,有人担心这会生锈闲置下来,经过1.5个小时的睡眠后,也加入到博客的功能,因为它是从l-blog修改,因此也适用于l-blog,此外,FBS l-blog改,也应该用这种方法来添加运行代码的功能。此外,因为复制代码和保存代码尚未发现一个与浏览器兼容的解决方案,它尚未添加。
实例:
以下步骤如下:
1。将下面的代码添加在包括 / common.js:
复制代码代码如下所示:
功能runcode(codeobjid){
无功codeobj = document.getelementbyid(codeobjid)
无功codestr = codeobj.value;
如果(codestr!){
无功codewin = window.open(' ',' ',' ');
codewin.document.open(中/的HTML,替换的);
codewin.opener = null
codewin.document.write(codestr);
Codewin.document.close();
}

}
2。发现包括 / ubbcode.asp strcontent = re.replace(strcontent,{代码}(){ }为{ }),然后添加以下代码:
l-blog:
复制代码代码如下所示:
重新模式=
strcontent = re.replace(strcontent,{ HTML } )

胎牛血清:
复制代码代码如下所示:
重新模式=
strcontent = re.replace(strcontent,{ HTML } )

要找到模式。*
复制代码代码如下所示:
重新设置模式:
集strmatches = re.execute(strcontent)
在每个匹配strmatches
rndstr = int(7999 *、+ 2000)
tmpstr1 = strmatch.submatches(0)
strcontent =取代(strcontent,匹配。价值,<文本行= 10 _
风格= 和宽度:90%;class=input_border ID = html_ rndstr >_
tmpstr1_
_
所有选择提示:您可以首先修改部分代码,然后运行)。
下一个

集strmatches =没有
三.在日志中发布的修改后可以用于运行代码({ } }将被替换为运行代码函数)。