<div id="text">good1230.com-专注于网站排名优化博客建站系统和好文分享</div>
let context = document.getElementById("text")
context.addEventListener('mouseup',() => {
const selection = window.getSelection()
const text = selection.toString()
console.log(text)
})