不知道为什么,撤消和恢复两个功能不管用。其他功能正常。
显示的代码:
<span class="WBTB_Btn" TITLE="删除" LANGUAGE="javascript" onclick="WBTB_format1('delete');">
<img class="WBTB_Ico" src="../js/wbTextBox/images/delete.gif" WIDTH="16" HEIGHT="16" unselectable="on">
</span>
<span class="WBTB_Btn" TITLE="撤消" LANGUAGE="javascript" onclick="WBTB_format1('Undo');">
<img class="WBTB_Ico" src="../js/wbTextBox/images/undo.gif" WIDTH="16" HEIGHT="16" unselectable="on">
</span>
<span class="WBTB_Btn" TITLE="恢复" LANGUAGE="javascript" onclick="WBTB_format1('Redo');">
<img class="WBTB_Ico" src="../js/wbTextBox/images/redo.gif" WIDTH="16" HEIGHT="16" unselectable="on">
</span>
执行的方法:
function WBTB_format1(what,opt)
{
if (opt=="removeFormat")
{
what=opt;
opt=null;
}
WBTB_Composition.focus();
if (opt==null)
{
WBTB_Composition.document.execCommand(what);
}else{
WBTB_Composition.document.execCommand(what,"",opt);
}
WBTB_pureText = false;
WBTB_Composition.focus();
}除了“撤消”和“恢复”,其他功能都能正常使用。实在搞不懂为什么。请大家帮忙