Javascript CKeditor文本区域具有值(PHP)(正在验证)

Javascript CKeditor文本区域具有值(PHP)(正在验证),javascript,php,validation,Javascript,Php,Validation,我是这方面的新手。我有一个问题,那就是验证ckeditor。验证文本字段和正常文本区域是否正常工作。我希望你们能帮忙。 对不起,我对这件事很陌生 这就是我要验证的地方 $msg = array(); //$varSubmitSucces=true; if(empty($_POST['thesis_title'])) $msg[] = "<div class=\"error\"><span>Please insert Thesis Title</span>&

我是这方面的新手。我有一个问题,那就是验证ckeditor。验证文本字段和正常文本区域是否正常工作。我希望你们能帮忙。 对不起,我对这件事很陌生

这就是我要验证的地方

$msg = array();
//$varSubmitSucces=true;


if(empty($_POST['thesis_title'])) $msg[] = "<div class=\"error\"><span>Please insert Thesis Title</span></div>";
if(empty($_POST['introduction']) || $_POST['introduction'] == "/^\s*$/")
$msg[] = "<div class=\"error\"><span>Please insert Introduction</span></div>";
if(empty($_POST['objective'])) $msg[] = "<div class=\"error\"><span>Please insert objective</span></div>";
if(empty($_POST['description'])) $msg[] = "<div class=\"error\"><span>Please insert Description</span></div>";
if($_POST['jobs1_area'] == "") $msg[] = "<div class=\"error\"><span>Please select Thesis Area</span></div>";
//print_r();
//print_r($msg);
//exit();      if(empty($msg)) 
{


`<?php if(!empty($msg)) {
    foreach($msg as $err) {
        echo $err;
    }
}?>`
$msg=array();
//$varSubmitSucces=true;
如果(空($_POST['thesis_title'])$msg[]=“请插入论文标题”;
如果(空($_POST['introduction'])|$_POST['introduction']==“/^\s*$/”)
$msg[]=“请插入介绍”;
如果(空($_POST['objective']))$msg[]=“请插入目标”;
如果(空($_POST['description']))$msg[]=“请插入说明”;
如果($\u POST['jobs1\u area']==”)$msg[]=“请选择论文区”;
//print_r();
//打印(msg);
//退出();if(空($msg))
{
``

$(文档).ready(函数(){
$('.error').hide();
var-ror=;
如果(错误){
$('.error').fadeIn(500)、delay(5000)、fadeOut(500);
警报(“简介:+文档.表单1.简介.值”);
$msg.focus();
}否则{
}
});

什么东西不起作用?你的意思是在PHP中验证?这是部分JS吗,就像来自ajax的成功一样?是的,在PHP中验证。我尝试验证ckeditor文本区域,但我尝试验证正常文本区域和文本字段。正在起作用。我读了其他论坛,大多数人说只需要使用(updateElement)但我不知道把它放在哪里我不知道CKEditor是如何工作的,你需要阅读他们的文档,看看它实际上发送了什么,以及如何使用隐藏字段
$(document).ready(function() {         

    $('.error').hide();
    var showError = <?php echo $msg; ?>;         
    if (showError) {             
        $('.error').fadeIn(500).delay(5000).fadeOut(500);
        alert("introduction: " + document.form1.introduction.value);
        $msg.focus();       
    } else {

    }

});