Sports Illustrated cnn link
Copy some content on the above web page and paste it in a notepad, you will see in addition to what copied there is a also a Read more link of the web pag开发者_如何学运维e you copied from.
How did they do this? Ideas?
It uses JavaScript provided by Tynt.
It basically uses Javascript's onCopy
event handler.
Information about onCopy:
https://developer.mozilla.org/en/DOM/element.oncopy
http://msdn.microsoft.com/en-us/library/ms536916(VS.85).aspx
Analysis of how Tynt works:
- http://blog.nparashuram.com/2009/03/how-tynt-works-technical-details.html
精彩评论