jQuery Ajax, overwrite onreadystatechange handler

前端 未结 3 1211
离开以前
离开以前 2020-12-10 08:57

I\'m recently fooling around with some ajax polling techniques. However, it seems like I can\'t overwrite the onreadystatechange handler from a XMLHttpReq

3条回答
  •  萌比男神i
    2020-12-10 09:27

    If you want a large level of customization, you can just get the XMLHttpRequest object and control it yourself.

    var x=new $.ajaxSettings.xhr();
    x.onreadystatechange=function(){ ... }
    ...
    

提交回复
热议问题