Home > Web Front-end > JS Tutorial > body text

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

WBOY
Release: 2016-05-16 17:57:14
Original
1131 people have browsed it

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/
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template