function validate(){
var oEditor = FCKeditorAPI.GetInstance("cont");
if(oEditor.GetXHTML() == ' '){
alert("内容不得为空");
return false;
}else{
return true;
}
}
怎么判断才能校验到内容前面是空格呢?
var oEditor = FCKeditorAPI.GetInstance("cont");
if(oEditor.GetXHTML() == ' '){
alert("内容不得为空");
return false;
}else{
return true;
}
}
怎么判断才能校验到内容前面是空格呢?
正则有好多种写法,随便取一个吧