为什么我的.ajax请求无法正常工作?

The code I want to work:

    $.ajax({
        type: "POST",
        url: "_Source/ajap/ajap.nlSrch.php",
        data: { sndJson : jsonData },
        dataType: "json", 
        processData: false,
        success: function(html) {
      $("#srchFrm").append(html);}
    });

The code that works:

    $.ajax({
        type: "POST",
        url: "_Source/ajap/ajap.nlSrch.php",
        data: { sndJson : jsonData },
        success: function(html) {
      $("#srchFrm").append(html);}
    });

Unfortunately when I send the first one my post data looks like this "Array ()" and when I use the later I get this "Array ( [sndJson] => [\"8\",\"3\",\"6\",\"7\"] )".

I know that there has to be a simple explanation but I haven't been able to figure it out.

Help please!

查看全部
weixin_33695450
weixin_33695450
2012/06/15 05:08
  • php
  • ajax
  • jquery
  • 点赞
  • 收藏
  • 回答
    私信

4个回复