百度编辑器是一款开源功能强大的编辑器,项目需要在1个页面放置多个百度编辑器,如何实现呢?1个页面放多个百度编辑器后程序如何取值呢?下面青岛星网跟大家分享下解决方法。
<form method="post" action="save.php"> <script type="text/plain" id="ueditorId_1" name="ueditorName_1" style="width: 400px;height:500px;">编辑器的默认值_1</script> <script type="text/javascript"> UE.getEditor('ueditorId_1');</script> <script type="text/plain" id="ueditorId_2" name="ueditorName_2" style="width: 450px;height:550px;">编辑器的默认值_2</script> <script type="text/javascript">UE.getEditor('ueditorId_2');</script> </form>
request.from("ueditorName_1") '编辑器1数值获取方法 request.from("ueditorName_2") '编辑器2数值获取方法
$_POST["ueditorName_1"]; // 第一个编辑器的值 $_POST["ueditorName_2"]; // 第二个编辑器的值