我已经使用 xul 在 Firefox 中添加了工具栏按钮,现在我想在 javascript 中更改该工具栏按钮的背景颜色。任何人请帮助
我的 xul 按钮代码是:
<toolbox id="navigator-toolbox">
    <toolbar id="TutTB-Toolbar" toolbarname="Tutorial Toolbar" accesskey="T"
       class="chromeclass-toolbar" context="toolbar-context-menu" 
       hidden="false" persist="hidden">
       <toolbaritem flex="0">
          <toolbarbutton id="TutTB-Web-Button" tooltiptext="Search"
             label="button" oncommand="alert('ok');" />
       </toolbaritem>
       <toolbarspring />
    </toolbar>
</toolbox>
我尝试通过以下代码行在javascript中访问它
var p = document.getElementById("TutTB-Web-Button");
alert(p.textContent);
document.getElementById("TutTB-Web-Button").style.backgroundColor='red';
    