Click the button to copy the link to my clipboard [compatible with all browsers], and click the link
First, take a look at my notes: Click me
Compatible with JQuery zClip plug-ins of all browsers for copying to clipboard
Load the JQuery library and zclip plug-in
- <ScriptType = "text/javascript" src = "js/jquery-1.8.1.min.js"></Script>
- <ScriptSrc = "js/jquery. zclip. min. js"></Script>
Below is a small demo, mainly copying the link in the text box to the clipboard.
HTML
- <InputType = "text" value = "www.baidu.com" id = "link">
- <SpanId = "copyBtn">Copy Link</Span>
Then add the script
Not necessarily the input tag, as long as the text can be obtained.
- <Script>
- $ ('# CopyBtn'). zclip ({
- Path: "ZeroClipboard.swf ",
- Copy: function (){
- Return $ ('# link'). val ();
- }
- });
- </Script>
Google Chrome clicks the button to copy and paste. Why can't I copy and paste it? Note: (copying an image is not a link)
It may be that the website does not support the Chrome kernel, causing a false death. I also have this problem with the latest DEV. Sometimes Baidu Google gets stuck and can use the Stable Board 10.
Google Chrome clicks the button to copy and paste. Why can't I copy and paste it? Note: (instead of copying images, copying a connection) 8565
I have no problem,
Maybe you can try the shortcut:
Copy: ctrl + c
Paste: ctrl + v