JS集成fckeditor及推断内容是否为空的方法_.docx

上传人:啊飒飒 文档编号:11660343 上传时间:2021-08-28 格式:DOCX 页数:4 大小:12.36KB
返回 下载 相关 举报
JS集成fckeditor及推断内容是否为空的方法_.docx_第1页
第1页 / 共4页
JS集成fckeditor及推断内容是否为空的方法_.docx_第2页
第2页 / 共4页
JS集成fckeditor及推断内容是否为空的方法_.docx_第3页
第3页 / 共4页
JS集成fckeditor及推断内容是否为空的方法_.docx_第4页
第4页 / 共4页
亲,该文档总共4页,全部预览完了,如果喜欢就下载吧!
资源描述

《JS集成fckeditor及推断内容是否为空的方法_.docx》由会员分享,可在线阅读,更多相关《JS集成fckeditor及推断内容是否为空的方法_.docx(4页珍藏版)》请在三一文库上搜索。

1、JS集成fckeditor及推断内容是否为空的方法_ 这篇文章主要介绍了JS集成fckeditor及推断内容是否为空的方法,涉及fckeditor的设置及页面元素的操作技巧,并分析了php环境下配置文件上传的留意事项,需要的伴侣可以参考下 本文实例讲解并描述了JS集成fckeditor及推断内容是否为空的方法。分享给大家供大家参考,具体如下: script type=text/javascript !- / Automatically calculates the editor base path based on the _samples directory. / This is usefu

2、ll only for these samples. A real application should use something like this: / oFCKeditor.BasePath = /fckeditor/ ; / /fckeditor/ is the default value. var sBasePath =/fckeditor/; var oFCKeditor = new FCKeditor( news_content ) ; oFCKeditor.BasePath = sBasePath ; oFCKeditor.Height = 400 ; oFCKeditor.

3、Width = 600 ; oFCKeditor.Value = ; oFCKeditor.Create() ; /- /取fck内容的长度 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. va

4、r r = oDOM.createRange() ; r.selectNodeContents( oDOM.body ) ; iLength = r.toString().length ; / oEditor.InsertHtml() return iLength function CheckPost() if(GetMessageLength(news_content)=0) alert(请输入内容); return false; /取fck内容 function GetMessageContent(str) var oEditor = FCKeditorAPI.GetInstance(st

5、r) ; return oEditor.GetXHTML(); /script 当有以下config.php配置时: $ConfigUserFilesPath = /upload/ ; $ConfigAllowedExtensionsImage = array(bmp,gif,jpeg,jpg,png) ; $ConfigDeniedExtensionsImage = array() ; $ConfigFileTypesPathImage = $ConfigUserFilesPath . image/ ; $ConfigFileTypesAbsolutePathImage= ($ConfigU

6、serFilesAbsolutePath = ) ? : $ConfigUserFilesAbsolutePath.image/ ; $ConfigQuickUploadPathImage = $ConfigUserFilesPath ; $ConfigQuickUploadAbsolutePathImage= $ConfigUserFilesAbsolutePath ; 上传时,快速上传将挺直上传到upload名目下 非快速上传将传到upload/image名目下 扫瞄服务器时图片扫瞄将指向upload/image所以快速上传的图片在扫瞄服务器时,不能扫瞄到。 盼望本文所述对大家JavaScript程序设计有所关心。 .

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 科普知识


经营许可证编号:宁ICP备18001539号-1