Skip to content

Instantly share code, notes, and snippets.

@r4vi
Created August 15, 2012 15:51
Show Gist options
  • Save r4vi/3361157 to your computer and use it in GitHub Desktop.
Save r4vi/3361157 to your computer and use it in GitHub Desktop.
html5 copy
<html>
<head>
<script>
function copy(event) {
event.clipboardData.setData('text/plain', 'Hello World!');
}
</script>
<body oncopy="copy(event)">
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment