ASP.NET 2.0中的ClipBoard [英] ClipBoard in ASP.NET 2.0

查看:136
本文介绍了ASP.NET 2.0中的ClipBoard的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Coders,

我正在尝试将在网页中找到的字符串复制到剪贴板.我们如何在ASP.NET中做到这一点?

在此先感谢您.

Hello Coders,

I''m trying to copy a string found in my web page to Clipboard. how can we do this in ASP.NET?

Thanks in advance.

推荐答案

您将需要在客户端上使用JavaScript. jQuery可以帮助您:

http://plugins.jquery.com/project/copy [
You''ll need to use JavaScript as it''s on the client. JQuery can help you:

http://plugins.jquery.com/project/copy[^]


window.clipboardData.setData(''Text'' , ''SomeValue'' );


请注意,您不能更改文本"关键字.


Please note you can''t change the ''Text'' keyword.

// get the clipboard data
var emailText = window.clipboardData.getData(''Text'');



如果要将其设置为CS文件,则可以使用脚本标签



If you want to set it into CS file you can do it using script tag


这篇关于ASP.NET 2.0中的ClipBoard的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆