Load javascript via Firebug console

依然范特西╮ 提交于 2019-11-28 15:59:06
var script = document.createElement("script");
script.src = "http://whatever.com/js/my/script.js";
document.body.appendChild(script);

A very handy command is include();

include("http://code.jquery.com/jquery-latest.min.js");

Read more about include() command

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!