【发布时间】:2012-04-04 15:35:58
【问题描述】:
你能在文档之外的元素上做execcommand吗?
我想知道你是否可以编写这样的代码:
contentDiv.execCommand()
代替:
document.execCommand()
【问题讨论】:
标签: javascript contenteditable execcommand
你能在文档之外的元素上做execcommand吗?
我想知道你是否可以编写这样的代码:
contentDiv.execCommand()
代替:
document.execCommand()
【问题讨论】:
标签: javascript contenteditable execcommand
没有。 execCommand() 仅限于HTMLDocument 节点(参见work-in-progress HTML Editing spec),IE 除外,其中它们的专有TextRange 和ControlRange 对象also support execCommand()。
【讨论】:
<div>。似乎它可能与隐藏的<textarea> 元素有关,您可以在<form> 中提交该元素。你怎么看?
designMode 在 iOS stackoverflow.com/a/5686070/96100