Load javascript via Firebug console

前端 未结 3 733
星月不相逢
星月不相逢 2020-12-12 17:19

How can I load a javascript file via Firebug console ?

This would be useful in development, so I don\'t have to modify the html code to load the script.

3条回答
  •  独厮守ぢ
    2020-12-12 17:34

    Just ran into the same problem, and - as jQuery is used in the project anyway - I decided to do a simple:

    $.getScript('example.js')
    

    Or:

    $.getScript('example.js', function () { doSomethingOnceLoaded(); })
    

    Alternatively, I may code JavaScript directly in Firebug, using the console with the text entry pane on the right side. Activate it with the triangle button in the lower right hand corner.

提交回复
热议问题