简体   繁体   English

在鼠标悬停时在div中选择文本

[英]Selecting text in div on mouseover

将鼠标悬停在div上时如何选择文本?

If you mean selecting the text as if you dragged over it, read this question . 如果您要像拖动文本一样选择文本,请阅读此问题 Whichever approach you try, to make it happen on mouseover, use .mouseenter() : 尝试使用哪种方法,使其在鼠标悬停时发生,请使用.mouseenter()

$('#mydiv').mouseenter( function(){
  my_superduper_selection_function(this);
});

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM