After previous post which is copying data to clipboard, now it’s time to paste the clipboard data to textarea. I give an example when the page load, the data are paste to textarea.
<script type=”text/javascript”>
function pasteClipboard() {
txt = document.form1.textareaName.createTextRange();
txt.execCommand(’Paste’);
}
</script>
<BODY onload=”pasteClipboard()”>
<form action=”" name=”form1″ method=”post”>
<TEXTAREA NAME=”textareaName”></TEXTAREA>
</form>
</body>
Remember this code only works in IE.
Be First To Comment
Related Post
Leave Your Comments Below