1. 程式人生 > >如何獲取ckeditor的內容

如何獲取ckeditor的內容

參數 內容 -a window var align rip nload 如何

<tr id="nr">
<th style="width:10%"><span class="a_hong">*</span> 榮譽說明:</th>
<td colspan="3" style="text-align:left;">
<textarea id="content" name="content" class="ckeditor">${ryInfo.content}</textarea>
</td>
</tr>

<script type="text/javascript">
var editor = null;
window.onload = function () {
editor = CKEDITOR.replace("content"); //參數‘content’是textarea元素的name屬性值,而非id屬性值
}
function savaData()(
  var content = CKEDITOR.instances.content.getData(); //獲取值
}
</script>

如何獲取ckeditor的內容