eWebEditor首页 >> eWebEditor帮助文档 V15.2 >> 开发手册 >> JavaScript API

3.7.19 update

描述

更新编辑器实例所关联的表单项值。如<textarea>.value<div>.innerHTML(V9.2版新增)

语法

object.update();

参数

:

<input type="hidden" name="content1" value="">

<iframe id="eWebEditor1" src="ewebeditor.htm?id=content1&style=standard600" frameborder="0" scrolling="no" width="600" height="350"></iframe>

 

<script type="text/javascript">

var editor = document.getElementById("eWebEditor1").contentWindow;

alert(document.getElementById("content1").value);    //空值

editor.update();    //更新input

alert(document.getElementById("content1").value);    //与当前编辑的值相同

</script>