当前位置: 代码迷 >> PHP >> js怎么取得ueditor里的值
  详细解决方案

js怎么取得ueditor里的值

热度:382   发布时间:2016-04-28 18:47:43.0
js如何取得ueditor里的值啊
我现在想用ajax的$post给服务器端传值,如何获取ueditor里的值呢,我的页面加载代码如下:
<textarea name="blog_content" id="blog_content"></textarea> 
<script type="text/javascript" charset="utf-8">UE.getEditor('blog_content');</script>
页面能显示出来ueditor。
我现在用jq呀js通过id“blog_content”取到的值alert出来全是空,取不到这个值,我如何$post这个值啊。。。。请高手解答
------解决方案--------------------
引用:
我查了editor的API,我看着有editor.getContent() 这个方法,我也用了,也是空。我不确定值是不是在blog_content里,用$('#blog_content').val();的值也是空。。。

那应该是你搞错对象,找错
UE.getEditor('editor').getContent() 用这看看
------解决方案--------------------
看看你的 .post 怎么写的。。。估计是写错了