How-to paste text from clipboard automatically onload page
<textarea id="pasteArea" cols="50" rows="10"></textarea><br>
<script>
window.addEventListener('load', (event) => {
let pasteArea = document.getElementById('pasteArea');
pasteArea.focus();
pasteArea.value = '';
navigator.clipboard.readText()
.then((text)=>{
pasteArea.value = text;
});
})
</script>
If you copied certain text, it will be pasted automatically in the text box.
in Chrome browser asks for permission

© 2025 Manajmnt code
Comments
Post a Comment
message