js判断FCKeditor内容是否为空
来源:互联网 发布:电脑自带编程软件 编辑:程序博客网 时间:2024/04/28 23:13
形式1:
function checkFCK(key)
{
var oEditor=FCKeditorAPI.GetInstance(key);
var content=oEditor.GetXHTML(true);
content=content.replace(/ /g,"");
content=content.replace(/\s/g,"");
content=content.replace(/ /g,"");
content=content.replace(/<br\/>/g,"");
content=content.replace(/<p><\/p>/g,"");
content=content.replace(/<div><\/div>/g,"");
if(content==null||content==""){
oEditor.SetHTML("");
return false;
}
return true;
}
形式2:
function GetMessageLength(str)
{
var oEditor = FCKeditorAPI.GetInstance(str) ;
var oDOM = oEditor.EditorDocument ;
var iLength ;
if ( document.all ) // If Internet Explorer.
{
iLength = oDOM.body.innerText.length ;
}
else // If Gecko.
{
var r = oDOM.createRange() ;
r.selectNodeContents( oDOM.body ) ;
iLength = r.toString().length ;
}
return iLength
}
function checkFCK(key)
{
var oEditor=FCKeditorAPI.GetInstance(key);
var content=oEditor.GetXHTML(true);
content=content.replace(/ /g,"");
content=content.replace(/\s/g,"");
content=content.replace(/ /g,"");
content=content.replace(/<br\/>/g,"");
content=content.replace(/<p><\/p>/g,"");
content=content.replace(/<div><\/div>/g,"");
if(content==null||content==""){
oEditor.SetHTML("");
return false;
}
return true;
}
形式2:
function GetMessageLength(str)
{
var oEditor = FCKeditorAPI.GetInstance(str) ;
var oDOM = oEditor.EditorDocument ;
var iLength ;
if ( document.all ) // If Internet Explorer.
{
iLength = oDOM.body.innerText.length ;
}
else // If Gecko.
{
var r = oDOM.createRange() ;
r.selectNodeContents( oDOM.body ) ;
iLength = r.toString().length ;
}
return iLength
}
- js判断FCKeditor内容是否为空
- 判断FCKeditor内容是否为空
- FCKeditor的js验证以及FCKeditor内容是否为空判断
- 用js获取FCKeditor的内容和判断内容是否为空
- 关于FCKeditor内容是否为空
- 关于FCKeditor内容是否为空
- js判断是否为空
- js判断是否为空
- js判断是否为空
- js判断是否为空
- js判断是否为空
- js判断是否为空
- js判断是否为空
- js 判断是否为空
- js判断是否为空
- js判断是否为空
- js判断是否为空
- 验证Fckeditor编辑器中的内容是否为空
- FCKeditor的js验证以及FCKeditor内容是否为空判断
- java clone 中的浅复制和深复制
- IOS开发(83)之为形状增加阴影
- ORACLE dblink数据库连接 使用简单字符串方式
- 解读vs2003、vs2005、vs2008开发Windows CE环境、默认SDK开发包及测试
- js判断FCKeditor内容是否为空
- [Android] 获取Android设备的唯一识别码|设备号|序号|UUID
- MFC中变量的命名方法
- DBhelper数据操作类
- 我的失恋
- 失业的程序员(十二):潜意识的智商
- win8计算器
- 虚拟键码对照表
- 初学者小结java和mysql