使用jQueryand时Ajax,我将整个 URL 传递给 ajaxurl:以防万一URL不存在(不知何故),我怎么page not found能从内部重定向到页面ajax?通过url并.htaccess归档。
$(document).ready(function() {
    $('.link').click(function () {
    var parentTag = 'check=checked';
    if(parentTag) {
        // ajax call
        $.ajax({
            type:"GET",
            url:"/mylink/buyers/1/0/0", //If this failed, how do I redirect to something else from here?
            data:parentTag,
        dataType: 'json',
            beforeSend:function(callBack){
                console.log('checked');
            },
            success: function(callBack){
                console.log('Success');
            },
            error: function(callBack){
                console.log('Failed');
            },
        });
    }
    return false;
    });
});