开发者

Script for adding a text in the ClipBoard when a User copy some text from my webpage

I use Asp.net and C# 4, but I suppose for this question I need some JavaScript (maybe jquery).

I have a Web Page, when a User copy some text from the page, I would like that in his Clipboards will be added some custom Text, for example the source URL where he copied the source text from. In this way when he PAST the text he can see the original Text + The custom Text added.

An example of implementation you can find here. Simple Copy and Pase from this page to a Text File and you can see what I need.

http://www.miamihe开发者_如何学运维rald.com/2011/10/03/2437413/asian-markets-lower-on-greek-debt.html

Any idea how to do it? Any reference? Thanks for your time on this.


You're looking for the oncopy event. An simple example of it's usage

Another example, adding a copyright warning

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜