首页 > 编程技术 > html

js 检测判断fckeditor是否为空

发布时间:2016-9-20 19:00

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.111cn.net").GetXHTML();  
 if(Content==null||Content==""){  
  alert('内容不能为空');  
  return false;   
 }
}
</script>
</head>

<body>
<div style="width:100%;">
<form>
<input type="hidden" id="www.111cn.net" name="www.111cn.net" value="<!

--{$dataInfo.house_desc|htmlspecialchars}-->" /><input type="hidden"

id="house_desc___Config" value="FullPage=false"/><iframe

id="house_desc___Frame"" width=100% src="/FCKeditor/editor/fckeditor.html?

InstanceName=house_desc&amp;Toolbar=Basic" width="100%" height="220"

frameborder="no" scrolling="no"></iframe>
<input name="" type="submit" value="提交"  onclick="return checkForm

();" />
</form></div>
</body>
</html>
本站原创www.111cn.net

二者没有多大的区别,特别是在前段,后段把以前apache .php?id=$1在iis改成了php\\?id=$1[N,I]写法。

apache+php教程 伪静态写法与iis+php 伪静态区别

这是apache+php  伪静态配置方法

RewriteRule /newhouse/m-(d+).html$  /newhouse/model.php?id=$1
RewriteRule /newhouse/p2-(d+).html$  /newhouse/pic2.php?id=$1

iis+php 伪静态配置方法

RewriteRule /newhouse/m-(d+).html  /newhouse/model.php?id=$1[N,I]

RewriteRule /newhouse/p2-(d+).html  /newhouse/pic2.php?id=$1[N,I]


本站原创文章转载注明 www.111cn.net

FCKeditor 如何清除内容代码呢,

这种方法很简单哦我们用fck来内容哦,经常在做判断fck 是否有内容时,js都取不到内容,

下面我们来看利用FCKeditorAPI.GetInstance自动的功能来处理吧。

下面来看看方法很简单哦。


var editor = FCKeditorAPI.GetInstance("content");
editor.EditorDocument.body.innerHTML="";

哈哈,就几句吧。

标签:[!--infotagslink--]

您可能感兴趣的文章: