Need to solve IE 8 Jquery problem

后端 未结 3 932
闹比i
闹比i 2021-01-23 13:36

In my development, I came on a strange problem. The following is my jquery code to load 2 datepicker when the page load, those 2 datepickers are disable the dates which are not

3条回答
  •  伪装坚强ぢ
    2021-01-23 14:23

    I remember having trouble in similar cases in IE when I did not specify what response format I expected. Try setting dataType in the ajax request like so:

    $.ajax({
        type: "GET",
        url: "include/getdate.php",
        data: dataString,
        dataType: 'json',
        success: successCallback
    }
    

    Also if you want to catch errors you should be able to specify an error callback like so:

    $.ajax({
        ....
        error: errorCallback
        ....
    }
    
    function errorCallback(jqXHR, textStatus, errorThrown) {
        alert(jqXHR);
        alert(textStatus);
        alert(errorThrown);
    }
    

    That should help with debugging.

提交回复
热议问题