开发者

toJSON "Object doesn't support this property or method"

开发者 https://www.devze.com 2022-12-29 09:38 出处:网络
I\'ve a Javascript Class and its method. But when i call it toJSON is generating an error. I couldn\'t figure out why this error is happening.

I've a Javascript Class and its method. But when i call it toJSON is generating an error. I couldn't figure out why this error is happening.

try {
    if (this.TabloEkId == undefined || this.TabloEkId == "") {
        throw errEksikVeri;
    }

    fAjaxSetup(fBefore, fSuccess, fError, fComplete);

    $.ajax({
        type: "POST",
        contentType:开发者_开发知识库 "application/json; charset=utf-8",
        url: ResolveUrl("~/Yonetim/WS/Yonetim.asmx/f_TabloEklerindenSil"),
        data: "{_tblEkId:" + this.TabloEkId + "}",
        dataType: "json"
    });

} catch (err) {
    f_ErrorViewer(err);
}

toJSON "Object doesn't support this property or method"

toJSON "Object doesn't support this property or method"


jQuery doesn't have built-in JSON serialization, and only their latest version detects native JSON APIs and uses them.

The toJSON() you seek is part of a jQuery plug-in.

I would use JSON2 if nothing else.

0

精彩评论

暂无评论...
验证码 换一张
取 消