Click here to Skip to main content
15,890,557 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hii all off you guys
i want to copy the text from a label by javascript, onclick on a button in a modal pop up
Posted
Comments
[no name] 30-Jan-12 9:01am    
What do you mean by "copy"? Do you mean place the selected text into the clipboard or just move the text to another place?
Rajesh Anuhya 30-Jan-12 9:56am    
Question Not clear.

1 solution

To copy something to the clipboard from JavaScript you can do:
window.clipboardData.setData('Text', 'This will be on the clipboard.');
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900