gra*_*ved 6 google-chrome-extension
我从 google 文档中的 hello world 应用程序开始编写一个 chrome 扩展。http://code.google.com/chrome/extensions/getstarted.html
我只是将 popup.js 修改为:
var span = document.createElement("span");
span.innerHTML = "<b>blah</b>";
alert(document.head);
alert(document.body);
document.body.appendChild(span);
Run Code Online (Sandbox Code Playgroud)
我希望这会在弹出窗口中显示“blah”,但我得到的 document.body 为空。我是 js 和 chrome 的新手,我试图弄清楚这里发生了什么。我究竟做错了什么?
归档时间: |
|
查看次数: |
3271 次 |
最近记录: |