js如何取得ueditor里的值啊 jsajaxphpueditor 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 1. editor.getContent() 直接用 ueditor对象方法2.$('#blog_content').val() ,你确定值在blog_content里 我查了editor的API,我看着有editor.getContent() 这个方法,我也用了,也是空。我不确定值是不是在blog_content里,用$('#blog_content').val();的值也是空 那应该是你搞错对象,找错UE.getEditor('editor').getContent() 用这看看 之前刚做过。直接$('#blog_content').val() 就ok了 没那么复杂 这个方法好用,能取到值了,谢谢。不过ajax的post提交为啥跳转了,还在地址栏转值呢?http://blog.local/index.php/admin/blog_c/insertBlog?blog_title=&select_category=%E8%AF%B7%E9%80%89%E6%8B%A9%E6%97%A5%E5%BF%97%E5%88%86%E7%B1%BB&blog_content=%3Cp%3Eaa%3Cbr+%2F%3E%3C%2Fp%3E 看看你的 .post 怎么写的估计是写错了 你用的是什么ajax包比如 jquery包的,$.post(url,{blog_content:....,select_category:...},function(){ alert('完成') }) url = "http://blog.local/index.php/admin/blog_c/insertBlog".post(url,{blog_title:UE.getEditor('editor').getContent()},function(d){});OK? $.post("<?php echo site_url('admin/blog_c/insertBlog') ?>",{blog_title:blog_title,blog_category:blog_category,blog_content:blog_content},function(data){ $(".category_list").html(data);});提交的一顺点我看间firebug里有提交请求,但是,是红色的,跳转后就看不见了 你先直接 alert 要提交各项的 值 是不是你要的虽然笨点,,但一看就晓得哪里错了 alert出来的值没问题,我每一项都显示了,都是我想要的值,但是php接收不到post$_POST['blog_content'],输出这个,说是变量blog_content未定义。我想应该是post提交没成功,因为我看到firebug里有红色。 我也不晓得问题在哪里。但按自己的情况来说我就先看 firebug 提交到的 地址有没有错 还有到底有底提交到没之前弄其他编译器的时候 也出现过同样的问题的。最后就是查看前后代码 哪里写错了 才解决的。。 用 google chrome 试试 我用的就是jquery包啊,发代码了,帮我看下问题出在哪儿了 你把前后的也发下 包括blog_title,blog_category:blog_category,blog_content:blog_content赋值那里我现在比较蛋疼研究研究 刚下了个chrome,看下图,怎么变Get了 这个问题我找着原因了,是我的写法有问题,我在button里写了个onclick事件,然后调研了一个方法,但是,我想,$.post只能运行在$(function(){});里吧,我重写了一下,给button加了个class,去掉了onclick,然后用jq写了个click,就好用了,感谢各位的帮忙,结贴了。 这个方法好用,能取到值了,谢谢。不过ajax的post提交为啥跳转了,还在地址栏转值呢?http://blog.local/index.php/admin/blog_c/insertBlog?blog_title=&select_category=%E8%AF%B7%E9%80%89%E6%8B%A9%E6%97%A5%E5%BF%97%E5%88%86%E7%B1%BB&blog_content=%3Cp%3Eaa%3Cbr+%2F%3E%3C%2Fp%3EUE.getEditor('editor').getContent() 这句话是写在 js 里面吗? 我写这个怎么也包空呢?求大虾指教. var conte = UE.getEditor('editor').getContent(); alert(conte);我在js里写的取不到啊.. 问题是对 的处理,如果ajax提交的内容中含有 ,$_POST("name")获取到得是 前面的值 mvc如何实现页面传值 各位大大们,请给我分析下,下面的代码,最好能够具体点,谢谢哈。。等着的 咨询phpmyadmin中文编码中文乱码问题 PHP 循环一周的日历 请教 手机图片的上传和下载的实现 老外的一个文本电影,强 想用php做一个树状的目录,具有超级连接的功能。 伪静态的正则语句 各位DX帮忙。。。关于取ip地址 在linux下安装PHP,Apache出现这样的问题如何解决? 从mysql中取出图片来rel使用遇到问题 php get 改 post的疑问
2.$('#blog_content').val() ,你确定值在blog_content里
UE.getEditor('editor').getContent() 用这看看
不过ajax的post提交为啥跳转了,还在地址栏转值呢?
http://blog.local/index.php/admin/blog_c/insertBlog?blog_title=&select_category=%E8%AF%B7%E9%80%89%E6%8B%A9%E6%97%A5%E5%BF%97%E5%88%86%E7%B1%BB&blog_content=%3Cp%3Eaa%3Cbr+%2F%3E%3C%2Fp%3E
比如 jquery包的,
$.post(url,{blog_content:....,select_category:...},function(){
alert('完成')
})
.post(url,{blog_title:UE.getEditor('editor').getContent()},function(d){});OK?
$.post("<?php echo site_url('admin/blog_c/insertBlog') ?>",
{blog_title:blog_title,blog_category:blog_category,blog_content:blog_content},
function(data){
$(".category_list").html(data);
});
提交的一顺点我看间firebug里有提交请求,但是,是红色的,跳转后就看不见了
我就先看 firebug 提交到的 地址有没有错 还有到底有底提交到没
之前弄其他编译器的时候 也出现过同样的问题的。
最后就是查看前后代码 哪里写错了 才解决的。。
赋值那里我现在比较蛋疼研究研究
不过ajax的post提交为啥跳转了,还在地址栏转值呢?
http://blog.local/index.php/admin/blog_c/insertBlog?blog_title=&select_category=%E8%AF%B7%E9%80%89%E6%8B%A9%E6%97%A5%E5%BF%97%E5%88%86%E7%B1%BB&blog_content=%3Cp%3Eaa%3Cbr+%2F%3E%3C%2Fp%3E
UE.getEditor('editor').getContent() 这句话是写在 js 里面吗? 我写这个怎么也包空呢?求大虾指教.
alert(conte);
我在js里写的取不到啊..