js获取fck值的代码方法

引入js文件

<script type="text/javascript" src="${basePath}/FCKeditor/fckeditor.js"></script>

 

fck在线编辑器使用:

<textarea id="partsIntroduce" name="partsIntroduce" cols="100" rows="10" ></textarea>
            <script type="text/javascript"> 
                  var basePath = document.getElementById("basePath").value;
                var oFCKeditor = new FCKeditor('partsIntroduce') ;
                oFCKeditor.BasePath = basePath+"FCKeditor/" ; 
                oFCKeditor.Height = 400; 
                //oFCKeditor.Width = 600; 
                oFCKeditor.ToolbarSet = "Default" ;  
                oFCKeditor.ReplaceTextarea(); 
            </script>

//js获取fck值的方式

var oEditor = FCKeditorAPI.GetInstance('partsIntroduce');  
var partsIntroduce = oEditor.GetHTML(); 

 

posted @ 2013-12-25 20:50  全新时代-小小程序员大梦想  阅读(286)  评论(0编辑  收藏  举报