Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当用户使用 JavaScript 在 HTML 页面中选择或更改某些文本和元素的选择时,我如何在Android 浏览器中的JavaScript中检测到事件?Android浏览器不会发送触摸端是这种情况吗?除了建立一个计时器还有什么想法吗?
最近的 WebKitselectionchange在document. 我不知道您的 Android 浏览器是否足够新,但您可以尝试一下。
selectionchange
document
document.addEventListener("selectionchange", function() { alert("Selection changed"); }, false);