Help - Input button clipboard paste function

L

Lenny Linux

Is there any javascript or html example code I can look at to have an input
button paste windows clipboard data into a textarea.

I'm just a slow in the head tired old man seeking answers to how.
 
L

Lenny Linux

Ok I figured it out.

I just needed to get the names straight - the form and the textarea than
reference it in the function to paste.

<Script>
function p1();{
disform.datextarea.value=window.clipboardData.getData("Text");
}
</script>

<form name=disform>
<input type=button value='Paste' onclick='p1()'>
<textarea name=datextarea></texarea>
<form>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top