简体   繁体   中英

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() :

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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