function runCode(obj) {
obj = obj.parentNode.getElementsByTagName('textarea')[0];
var winname = window.open('', "_blank", '');
winname.document.open('text/html', 'replace');
winname.opener = null // 防止代码对论谈页面修改
winname.document.write(obj.value);
winname.document.close();
}
function saveCode(obj) {
obj = obj.parentNode.getElementsByTagName('textarea')[0];
var winname = window.open('', '_blank', 'top=10000');
winname.document.open('text/html', 'replace');
winname.document.write(obj.value);
winname.document.execCommand('saveas','','code.htm');
winname.close();
}
function CopyCode(obj) {
obj = obj.parentNode.getElementsByTagName('textarea')[0];
if(document.all && obj.style.display != 'none') {
var rng = document.body.createTextRange();
rng.moveToElementText(obj);
rng.scrollIntoView();
rng.select();
rng.execCommand("Copy");
rng.collapse(false);
}
}
using System;
using BlogEngine.Core;
using System.Web;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Text.RegularExpressions;
using BlogEngine.Core.Web.Controls;
/// <summary>
/// 增加flashMp3播放器
/// </summary>
[Extension("mp3 player", "1.0.0.0", "lemongtree.com")]
public class mp3player
{
private const string _audioroot = "mp3/";
private const string _jsfile = "audioplayer.js";
private static long _cnt = 0;
public mp3player()
{
Post.Serving += new EventHandler<ServingEventArgs>(Post_Serving);
}
}
红色公布这段ubb,含运行代码功能
ubb.cs (4.57 kb)