Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/80.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
处理ajax jquery时出错_Jquery_Json_Firebug - Fatal编程技术网

处理ajax jquery时出错

处理ajax jquery时出错,jquery,json,firebug,Jquery,Json,Firebug,给出了一个不能用firebug捕获的错误,我想知道这段代码有什么问题 var obj = {}; obj.registry= $("#ctl00_ContentPlaceHolder1_TextBox3").val(); $.ajax({ type: "POST", url: "Page.aspx/PatientCheck", data: JSON.stringify(obj.toString()), contentType

给出了一个不能用firebug捕获的错误,我想知道这段代码有什么问题

var obj = {}; obj.registry= $("#ctl00_ContentPlaceHolder1_TextBox3").val();
    $.ajax({
        type: "POST",
        url: "Page.aspx/PatientCheck",
        data: JSON.stringify(obj.toString()),
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        success: function(msg)
        {
            isErrror= true;
        },
        error: function()
        {

        }
    });
此代码用于验证是否已经有一名患者使用相同的代码,因此验证器。

data: {str: JSON.stringify(obj)}

更改此行:

data: JSON.stringify(obj.toString()),
为此:

data: JSON.stringify(obj),
data: JSON.stringify(obj),