日期:2014-05-16  浏览次数:20380 次

怎么利用JS获取HtmlEditor的值
我找了一个编辑器交HtmlEditor,觉得很好用,但是关键的问题是不知道在本页面利用JS获取文本域的值,有没有谁用过这个编辑器请帮帮我吧,我急用啊!!
  主页面代码如下:
  <HTML>
<HEAD>
<TITLE>超简单的HTML编辑器</TITLE>
</head>
<body>
  <textarea name="body" cols="90" style="color:#6699cc; display:none;" rows="60" id="body"></textarea>
  <iframe ID="Editor" name="Editor" src="HtmlEditor/index.html?ID=body" frameBorder="0" arginHeight="0" marginWidth="0" scrolling="No" style="height:320px;width:100%"></iframe>
  
  </body>
</html>

------解决方案--------------------
编辑器的话建议用FCKEditor 
// 获取FCKEditor中的内容: content为Editor实例的ID 
function getEditorContents(){ 
var oEditor = FCKeditorAPI.GetInstance("content"); 
alert(oEditor.GetXHTML(true)); 



HtmlEditor没用过
 获取textarea name 或者 id 输出来看看获取的道不