js 检测判断fckeditor是否为空
js 检测判断fckeditor是否为空
<!-- 用一般的js是不可能获取 fck 编辑器内容的是否有值的,我们得用
FCKeditorAPI接口来实例-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>js 检测判断fckeditor是否为空</title>
<script language="javascript教程">
function checkForm(formDom){
var Content =FCKeditorAPI.GetInstance
(".net教程").GetXHTML">www.zhaoxi.net").GetXHTML();
if(Content==null||Content==""){
alert('内容不能为空');
return false;
}
}
</script>
</head>
<body>
<div style="width:100%;">
<form>
<input type="hidden" id="www.zhaoxi.net" name="www.zhaoxi.net" value="<!
--{$dataInfo.house_desc|htmlspecialchars}-->" /><input type="hidden"
id="house_desc___Config" value="FullPage=false"/><iframe
id="house_desc___Frame" src="/FCKeditor/editor/fckeditor.html?
InstanceName=house_desc&Toolbar=Basic" width="100%" height="220"
frameborder="no" scrolling="no"></iframe>
<input name="" type="submit" value="提交" onclick="return checkForm
();" />
</form></div>
</body>
</html>
本站原创www.zhaoxi.net
补充:网页制作,设计基础