How to find out which Javascript causes a jQuery Ajax request?

前端 未结 3 884
借酒劲吻你
借酒劲吻你 2020-12-12 13:38

How to find the Javascript code from where a Ajax request triggered? In Firebug\'s console we are able to identify the file and line number, but if we\'re using $.ajax

3条回答
  •  借酒劲吻你
    2020-12-12 14:11

    In chrome and firefox/firebug you may use console.trace() on the .always() or perhaps on the beforeSend handler of your ajax call to see who called it.

提交回复
热议问题