css uses user-select to prohibit copying
<!DOCTYPE html>
<html>
<head>
<style>
div {
-webkit-user-select: none; /* Safari */
-ms-user-select: none; /* IE 10 and IE 11 */
user-select: none; /* Standard syntax */
}
</style>
</head>
<body>
<h1>user-select 属性</h1>
<div>The text of this div element cannot be selected. If you double-click me, my text will not be highlighted.</div>
</body>
</html>
js listens to the copy event
document.addEventListener('copy',(e)=>{
e.preventDefault()
})