...

View Full Version : on select text -> copy text to clipboard



Jefis
08-14-2005, 12:57 AM
how can i make, if user selects text, javascript automatically copy it to clipboard :)

jscheuer1
08-14-2005, 05:27 AM
For IE only:

<script type="text/javascript">
document.onselectionchange=function(){document.execCommand("Copy")}
</script>

brothercake
08-15-2005, 08:55 PM
Still a bit rude though - what if I had data in the clipboard that I wanted there? You should at least warn users that this will happen.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum