在您的代码中使用以下内容或作为书签:
代码
void(function foo()
{
/* get head element */
var head=document.getElementsByTagName("head")[0];
/* create script and link elements */
var qUnitJS = document.createElement("script");
var qUnitCSS = document.createElement("link");
/* link rel and type attributes required for lazy loading */
qUnitCSS.rel="stylesheet";
qUnitCSS.type="text/css";
/* define script src attribute to lazy load */
qUnitJS.src = "http://qunitjs.com/resources/qunit.js";
/* append script and link elements */
head.appendChild(qUnitJS);
head.appendChild(qUnitCSS);
/* define link href after DOM insertion to lazy load */
qUnitCSS.href="http://qunitjs.com/resources/qunit.css";
/* call tests after QUnit loads */
qUnitJS.onload = function () {};
}() )
书签
javascript:void(function foo(){var head=document.getElementsByTagName("head")[0]; var qUnitJS = document.createElement("script"); var qUnitCSS = document.createElement("link"); qUnitCSS. rel="stylesheet"; qUnitCSS.type="text/css"; qUnitJS.src = "http://qunitjs.com/resources/qunit.js"; head.appendChild(qUnitJS); head.appendChild(qUnitCSS); qUnitCSS.href="http://qunitjs.com/resources/qunit.css"; qUnitJS.onload = function () {};}() )
在 Firefox 中,设置security.mixed_content.block_active_content
为 falseabout:config
以将混合的活动内容作为书签运行。
参考