jQuery $.ajax Not Working in IE8 but it works on FireFox & Chrome

前端 未结 6 2147
臣服心动
臣服心动 2020-12-17 01:58

I have the following ajax call which works perfectly in Firefox and Chrome but not IE:

function getAJAXdates( startDate, numberOfNights, opts ) {

    var mo         


        
6条回答
  •  感动是毒
    2020-12-17 02:26

    I would comment out the contentType and add dataType: "json"

    from http://api.jquery.com/jQuery.ajax/

    dataType: The type of data that you're expecting back from the server.

    contentType: When sending data to the server, use this content-type.

    you are specifying that you are sending json, but you are not - maybe this is the issue?

提交回复
热议问题