Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

一些你可能不知道的浏览器API #28

Open
TokenYangForever opened this issue Mar 2, 2018 · 0 comments
Open

一些你可能不知道的浏览器API #28

TokenYangForever opened this issue Mar 2, 2018 · 0 comments

Comments

@TokenYangForever
Copy link
Owner

foreword

  • 一些浏览器的API,至少在chrome里是支持的,其他浏览器兼容性这里不做讨论。

content

  • document/window.getSelection()获取当前用鼠标选中的文字内容(ps: 选中多个标签以其中某个为准)
  • document.execCommand(),让文档执行命令(比如copy、cut、delete),参考
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant