execCommand在编辑器中应用比较广泛,MSDN上面的介绍是:Executes a command on the current document, current selection, or the given range.(在当前文档、当前选区或者给定的范围执行一个命令),

bSuccess = object.execCommand(sCommand [, bUserInterface] [, vValue]);
现在我们用加粗来测试该命令在四大内核上的表现:

editor.execCommand("Bold", false, value);

| 内核 | 审查元素 | alert | | webkit | b | strong | | trident | strong | strong | | gecko | span | span | | presto | strong | strong |

注:审查元素是指使用浏览器内置的调试工具通过查看html获取