开发者

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

开发者 https://www.devze.com 2023-04-10 17:18 出处:网络
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

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

精彩评论

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