Chinaunix

标题: 怎样判断在线编辑器中的内容是否为空? [打印本页]

作者: ultralqxq    时间: 2006-04-27 15:20
标题: 怎样判断在线编辑器中的内容是否为空?
在线编辑器为fckeditor,以下是引用代码:
<?php
          include("../../include/fckeditor/fckeditor.php") ;
          $oFCKeditor = new FCKeditor('FCKeditor1')  ;
          $oFCKeditor->BasePath = '../../include/FCKeditor/' ;
          $oFCKeditor->ToolbarSet = 'Default' ;
          $oFCKeditor->InstanceName = 'EditorDefault' ;
          $oFCKeditor->Width = '100%' ;
          $oFCKeditor->Height = '400' ;
          //$oFCKeditor->Value='';
          $oFCKeditor->Create() ;
?>

然后在javasrcipt里判断:
if(thefrom.EditorDefault.value == "")
        {
                alert("请输入内容!");
                thefrom.EditorDefault.focus();
                return false;
        }

为什么时效时不效啊?是缓冲的关系吗?????




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2