javascript - Button to Copy a Text Box -


I need a simple script which gives me a button that, when clicked, the content of the text input box in the clipboard Will be copied. Or it could be a script when you click on the text input box, then copies the contents to the clipboard itself and displays a "copy" message next to the text input box.

I have seen them all on the web, but no one can get the code for

Uses this example:

Fu , and one button with an ID of clickme < / Code>, Here's how I do it:

  var inputText = ""; $ ("#click"). Click (function () {inputText = $ ("# foo"). Val ();}); // Input text now has the value of the input box  

Edit:

After your explanation, now I understand that What are you trying to do? Unfortunately, Flash 10 broke most of the methods to do this. However, some great people wrote, which is fully compatible with Flash 10 and it's really easy to complete this task. Uses the usage


Comments