function addEventHandler(target, type, func) {
if (target.addEventListener)
target.addEventListener(type, func, false);
else if (target.attachEvent)
target.attachEvent("on" + type, func);
else target["on" + type] = func;
}
var editorButtonClick = function()
{
var ta=document.createElement("textarea");
ta.setAttribute("id","editTa");
ta.value=newValue;
editorButton.innerHTML="";
editorButton.appendChild(ta);
$.fck.config = {path: 'scripts/fckeditor/',height:400,toolbar:'Basic'};
$('textarea#editTa').fck();
};
addEventHandler(editorButton, "click", editorButtonClick);
阅读(553) | 评论(0) | 转发(0) |