下面是我的 YWA 包装器的代码
var astr_ywascript = (document.createElement("script").type = "text/javascript").src = "http://d.yimg.com/mi/eu/ywa.js";
document.head.appendChild(astr_ywascript); // <- error on this line
它是在页面加载时运行的,所以 JS 找不到文档头标签是没有意义的。
有任何想法吗?
谢谢
Opera 在同一行抛出此错误。Uncaught exception: Error: WRONG_ARGUMENTS_ER
萤火虫 说:document.head is undefined [Break On This Error] document.head.appendChild(astr_ywascript);