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

前端 未结 6 2132
臣服心动
臣服心动 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:29

    I also have encountered a somewhat similar problem with $.ajax() (jquery v1.4.2). It's not working in IE8, whereas in Firefox it's working.

    However, I've noticed from the IE8 debug toolbar that my page is in quirks mode. So, I forcefully make it to work in standard mode by inserting this doctype . Suddenly the $.ajax() works!

    I don't really understand about quirks/standard mode but the word "standard" somehow feels closer to Firefox or Chrome, rather than IE. So that's how I got the idea.

    @see http://en.wikipedia.org/wiki/Quirks_mode

提交回复
热议问题