Code
Execute
<
!DOCTYPE
html
>
<
html
>
<
body
>
<
input
type
="text"
value
="HTML"
oncopy
="Wikitechy()"
>
<
p
id
="wikitechy"
>
<
/p
>
<
script
>
function
Wikitechy() {
document.getElementById(
"wikitechy"
).innerHTML =
"Copied the text!"
}
<
/script
>
<
/body
>
<
/html
>
<!DOCTYPE html> <html> <body> <input type="text" value="HTML" oncopy="Wikitechy()" > <p id="wikitechy"> </p> <script> function Wikitechy() { document.getElementById("wikitechy").innerHTML = "Copied the text!" } </script> </body> </html>
Result