Add a version or connection address after the content of the website copy. This is what most webmasters do now, now I have sorted out some frequently-used JavaScript codes for automatically adding copyright information to the copied content. Some may randomly add copyright codes in the middle of the article.
Method 1: Add version information to the end of the copy of common code.
When copying the website content, we can add a piece of code to indicate the source of the article to keep the information of the website author.
First, create a js file named copymsg. js,
The Code is as follows: |
Copy code |
// Copy the content to automatically add copyright information Var thehits = document. getElementById ("thehit "); If (thehits! = Null ){ Thehits. innerHTML = "22936 "; } Document. body. oncopy = function () { SetTimeout ( Function () { Var text = clipboardData. getData ("text "); If (text) { Text = text + "rn this article |