function getEditorHTMLContents(EditorName) { var oEditor = FCKeditorAPI.GetInstance(EditorName); return (oEditor.GetXHTML(true)); } function CheckInput() { var result = $("#form1").validate({ rules: { txtSQS: { valiText: true } }, errorClass: "errorClass" }); return result.form(); } $(function () { $("#lbtnSave").click(function () { return CheckInput(); }); }); jQuery.validator.addMethod("valiText", function (value, element) { var result = false; var sqs = getEditorHTMLContents("txtSQS");//改为所验证的ID就OK了 if (sqs.length > 0) { result = true; } return result; }, "*必填。");