解决方案 »

  1.   

    1. editor.getContent() 直接用 ueditor对象方法
    2.$('#blog_content').val() ,你确定值在blog_content里
     
      

  2.   

    我查了editor的API,我看着有editor.getContent() 这个方法,我也用了,也是空。我不确定值是不是在blog_content里,用$('#blog_content').val();的值也是空
      

  3.   

    那应该是你搞错对象,找错
    UE.getEditor('editor').getContent() 用这看看
      

  4.   

    之前刚做过。直接$('#blog_content').val() 就ok了 没那么复杂
      

  5.   

    这个方法好用,能取到值了,谢谢。
    不过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
      

  6.   

    看看你的 .post 怎么写的估计是写错了
      

  7.   

    你用的是什么ajax包
    比如 jquery包的,
    $.post(url,{blog_content:....,select_category:...},function(){
       alert('完成')
     })
      

  8.   

    url = "http://blog.local/index.php/admin/blog_c/insertBlog"
    .post(url,{blog_title:UE.getEditor('editor').getContent()},function(d){});OK?
      

  9.   


    $.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里有提交请求,但是,是红色的,跳转后就看不见了
      

  10.   

    你先直接 alert 要提交各项的 值 是不是你要的虽然笨点,,但一看就晓得哪里错了
      

  11.   

    alert出来的值没问题,我每一项都显示了,都是我想要的值,但是php接收不到post$_POST['blog_content'],输出这个,说是变量blog_content未定义。我想应该是post提交没成功,因为我看到firebug里有红色。
      

  12.   

    我也不晓得问题在哪里。但按自己的情况来说
    我就先看 firebug 提交到的 地址有没有错 还有到底有底提交到没
    之前弄其他编译器的时候 也出现过同样的问题的。
    最后就是查看前后代码 哪里写错了 才解决的。。
      

  13.   

    用 google chrome 试试
      

  14.   

    我用的就是jquery包啊,发代码了,帮我看下问题出在哪儿了
      

  15.   

    你把前后的也发下 包括blog_title,blog_category:blog_category,blog_content:blog_content
    赋值那里我现在比较蛋疼研究研究
      

  16.   

    刚下了个chrome,看下图,怎么变Get了
      

  17.   

    这个问题我找着原因了,是我的写法有问题,我在button里写了个onclick事件,然后调研了一个方法,但是,我想,$.post只能运行在$(function(){});里吧,我重写了一下,给button加了个class,去掉了onclick,然后用jq写了个click,就好用了,感谢各位的帮忙,结贴了。
      

  18.   

    这个方法好用,能取到值了,谢谢。
    不过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  里面吗?  我写这个怎么也包空呢?求大虾指教.
      

  19.   

    var conte = UE.getEditor('editor').getContent(); 
    alert(conte);
    我在js里写的取不到啊..
      

  20.   

    问题是对&nbsp的处理,如果ajax提交的内容中含有&nbsp,$_POST("name")获取到得是&nbsp前面的值