Mengedit Kode:
Lihat Hasil »
Cobalah sendiri - ©
w3ii.com
<
!DOCTYPE
html
>
<
html
>
<
body
>
<
input
type
="text"
oncut
="myFunction()"
value
="Try to cut this text"
>
<
p
id
="demo"
>
<
/p
>
<
script
>
function
myFunction() {
document.getElementById(
"demo"
).innerHTML =
"You cut text!"
;
}
<
/script
>
<
/body
>
<
/html
>
<!DOCTYPE html> <html> <body> <input type="text" oncut="myFunction()" value="Try to cut this text"> <p id="demo"></p> <script> function myFunction() { document.getElementById("demo").innerHTML = "You cut text!"; } </script> </body> </html>