标签: javascript execcommand
我想知道之前没有选择是否可以使用document.execCommand("unlink", false, false)。 或者换句话说,是否可以模拟选择,以便我们可以使用execCommand,因为我期待这样做?
document.execCommand("unlink", false, false)
execCommand
编辑: 更确切地说,我想使用range对象来模拟选择。 In this example您可以看到我正在检查插入符号是否在<a>标记中。所以,从这里开始,我想在不选择全文的情况下取消链接。
range
<a>