我想要JavaScript代码来检测游标类型.
例如,当光标悬停在textarea中时,它会从默认值更改为文本.
它有任何方法绑定execcommand与div元素而不是整个文档,我试试这个:
document.getElementById('div').execcommand(...)
Run Code Online (Sandbox Code Playgroud)
但它有一个错误:
execcommand is not a function
Run Code Online (Sandbox Code Playgroud)
它有任何方法绑定execcommand只有div元素而不是整个文件!! 我不喜欢使用iframe方法.