1.
$("#btnSey").click(function() {
var con = $.trim($("#FCK1").val());
if (con == "") {
alert("评论不能为空,请输入要评论的内容!");
$("#FCK1").focus();
return false;
}
else
return true;
});
2.没有生成前的FCK页面代码
<FCKeditorV2:FCKeditor ID="FCK1" Width="100%" Height="200px" runat="server"></FCKeditorV2:FCKeditor>3.生成THML后的页面代码(下面的代码是我在FCK编辑器框里输入“应该可以”后解析出来的html代码,为什么下面的:value=""呢!)
<div><input type="hidden" id="FCK1" name="FCK1" value="" /><input type="hidden" id="FCK1___Config" value="HtmlEncodeOutput=true" /><iframe id="FCK1___Frame" src="/FckEditor/editor/fckeditor.html?InstanceName=FCK1&Toolbar=Default" width="100%" height="200px" frameborder="no" scrolling="no"></iframe></div>希望大家知道的能告之小弟下!最好有代码解释说明的解决方案!
$("#btnSey").click(function() {
var con = $.trim($("#FCK1").val());
if (con == "") {
alert("评论不能为空,请输入要评论的内容!");
$("#FCK1").focus();
return false;
}
else
return true;
});
2.没有生成前的FCK页面代码
<FCKeditorV2:FCKeditor ID="FCK1" Width="100%" Height="200px" runat="server"></FCKeditorV2:FCKeditor>3.生成THML后的页面代码(下面的代码是我在FCK编辑器框里输入“应该可以”后解析出来的html代码,为什么下面的:value=""呢!)
<div><input type="hidden" id="FCK1" name="FCK1" value="" /><input type="hidden" id="FCK1___Config" value="HtmlEncodeOutput=true" /><iframe id="FCK1___Frame" src="/FckEditor/editor/fckeditor.html?InstanceName=FCK1&Toolbar=Default" width="100%" height="200px" frameborder="no" scrolling="no"></iframe></div>希望大家知道的能告之小弟下!最好有代码解释说明的解决方案!
function getEditorHTMLContents(EditorName) {
var oEditor = FCKeditorAPI.GetInstance(EditorName);
return(oEditor.GetXHTML(true));
}// 获取编辑器中文字内容
function getEditorTextContents(EditorName) {
var oEditor = FCKeditorAPI.GetInstance(EditorName);
return(oEditor.EditorDocument.body.innerText);
}
参考:http://www.cnblogs.com/yssoft/archive/2009/04/29/1446342.html