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.
如何在鼠标位置获取文本?我现在有一些这样的
document.body.onmousemove = function(){ //todo:Get text at mouse position }
One way of doing so is using [PrototypeJs][1] Try this one let me know if there is any problem $(document.body).observe('click', respondToClick); function respondToClick(event) { var element = event.element(); var source = element.innerHTML; }