【发布时间】:2009-12-05 22:35:01
【问题描述】:
有没有人有一个 sn-p 可以从 firebug 将 jquery 加载到任何页面上?我经常遇到我更愿意使用熟悉的 jq 语法检查的网站。
例如,假设我想从页面中提取价格列表 - 最好启动 firebug,从 google CDN 安装 jquery,然后键入 $('li.prices').each(... )。
【问题讨论】:
有没有人有一个 sn-p 可以从 firebug 将 jquery 加载到任何页面上?我经常遇到我更愿意使用熟悉的 jq 语法检查的网站。
例如,假设我想从页面中提取价格列表 - 最好启动 firebug,从 google CDN 安装 jquery,然后键入 $('li.prices').each(... )。
【问题讨论】:
【讨论】:
另一种方法是将其粘贴到 Firebug 控制台并点击执行按钮。
var fileref = document.createElement("script");
fileref.setAttribute("type", "text/javascript");
fileref.setAttribute("src", "http://code.jquery.com/jquery-latest.min.js");
document.head.appendChild(fileref);
更新:使用以下 sn-p 将 jQuery 注入使用 HTTPS 的网站:
var fileref = document.createElement("script");
fileref.setAttribute("type", "text/javascript");
fileref.setAttribute("src", "https://code.jquery.com/jquery-latest.min.js");
document.head.appendChild(fileref);
【讨论】:
Blocked loading mixed active content "http://code.jquery.com/jquery-latest.min.js"。
【讨论】:
【讨论】:
查看jQuerify
【讨论】: