Home  >  Article  >  Web Front-end  >  ASP.NET jQuery Example 4 (Copy TextBox text to local clipboard)_jquery

ASP.NET jQuery Example 4 (Copy TextBox text to local clipboard)_jquery

WBOY
WBOYOriginal
2016-05-16 17:57:141131browse

In this section, we will see how to copy the contents of a multiline text box to the clipboard.
Note: jQuery clipboard plugin only supports IE

Interface code:

Copy code The code is as follows:




Please enter your comment:


runat="server">







Display interface:

Script part:
Copy code The code is as follows:






After adding the script, click the copy button to display the following effect:

Open Notepad and press Ctrl V:

Haha it worked, it’s that simple.
Plug-in download address: http://plugins.jquery.com/project/clipboard
There is also a Zero clipboard plug-in that supports cross-browser. It is implemented through a flash file and JavaScript interface. I want to know more For information, please visit http://code.google.com/p/zeroclipboard/
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn