| Author: Lalji 05 Nov 2009 | Member Level: Diamond | Rating:  Points: 2 |
show this sample code
<html> <head> <title>Copy select</title> <script> /* Function to copy a selection to clipboard Copyright (c) 2001 Michel Plungjan javascripts(a)planet.nl */
function copyText(theSel) { if (!document.all) return; // IE only theForm = theSel.form; theForm.copyArea.value=theSel.options[theSel.selectedIndex].value; r=theForm.copyArea.createTextRange(); r.select(); r.execCommand('copy'); } </script> </head>
<body> <form> <select onChange="copyText(this)"> <option value="">Please select <option value="alpha">A <option value="bravo">B
</select> <input type="hidden" name="copyArea" value=""> </form>
</body> </html>
more reference ----------------- http://www.frontpagewebmaster.com/m-185852/tm.htm http://davidwalsh.name/clipboard
|
| Author: vipul 05 Nov 2009 | Member Level: Diamond | Rating:  Points: 2 |
hi, if you running this on firefox then it is possible to get error (because your code is only work on microsoft ie) for running that into mozzila you can refer this link http://www.gamedev.net/community/forums/topic.asp?topic_id=281951
Please Rate This Answer If They Helpful
Thanks & Regards Patel Vipul
|