Recently, the project needs, in order to obtain more users want to search for information, the user needs to click on the copied content to obtain, and then send to the backstage to better understand customer needs, their own in this method planted a big somersault, only consider its one but do not know the combination of use, brain lag, essays down, hope that they can slowly grow, progress
<class= "ContentText" oncopy= "myFunction ()">
Used to test the monitoring of mobile phone-side copy content used to test the monitoring of mobile phone-side copy content to test the monitoring of mobile copy content
Flexible use to avoid brain lag and flexible use to avoid brain lag
Flexible use to avoid brain lag and flexible use to avoid brain lag
Flexible use to avoid brain lag and flexible use to avoid brain lag
</div>
<script> function myFunction () { var txt; = window.getselection (); if (Txt.tostring (). length > 1) { alert ("performed copy:" +txt); $.ajax ({ // transfer data to background }) } </script>
where window.getselection () is to get the selected content, see Https://developer.mozilla.org/zh-CN/docs/Web/API/Window/getSelection
Phone pc listens for user copied content