Menu
Hello. I am coding a function that does the thing mentioned in the title of this thread. Could you please help me to finish it? Here is my code:
[code]
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<script>
function paste() {
let textarea = document.getElementById(“myText0”);
textarea.select();
document.execCommand(“paste”);
}
</script>
<center>
<table bgcolor=#800000 cellspacing=20>
<tr><td>
<textarea type=”text” id=”myText0″ cols=”70″ rows=”10″></textarea>
<button onclick=”paste()”>paste text</button>
</td></tr>
</table>
</center>
</body>
</html>
Thank you.