我是js盲,
function insertHTMLToEditor(obj) {
var oEditor = FCKeditorAPI.GetInstance("<%= fck_Content.ClientID %>");
if (oEditor.EditMode == FCK_EDITMODE_WYSIWYG) {
oEditor.InsertHtml(obj)
}
else {
return false;
}
}
这么一段脚本写在head中
我想通过body中的一个
<input id="Button1" type="button" value="button"
来调用它,请问怎么写呢?
function insertHTMLToEditor(obj) {
var oEditor = FCKeditorAPI.GetInstance("<%= fck_Content.ClientID %>");
if (oEditor.EditMode == FCK_EDITMODE_WYSIWYG) {
oEditor.InsertHtml(obj)
}
else {
return false;
}
}
这么一段脚本写在head中
我想通过body中的一个
<input id="Button1" type="button" value="button"
来调用它,请问怎么写呢?
onclick="insertHTMLToEditor('<b>ok</b>')"
onclick="insertHTMLToEditor('参数')" 这样可以调用了
<input id="Button1" type="button" value="button" onclick="insertHTMLToEditor('<b>test</b>')"/>