判断fck编辑是否填写内容

来源:互联网 发布:mac电脑文件管理 编辑:程序博客网 时间:2024/05/20 23:38

    <script type="text/javascript">

    function Chk()

    {

        var oEditor =FCKeditorAPI.GetInstance("FCKeditor1"); 

         var Content=oEditor.GetXHTML(); 

         if(Content=="") 

         { 

             alert("您还没有写内容"); 

             oEditor.Focus();//获取焦点 

             return false; 

         } 

    }

    </script>