![]() |
Definition and UsageThe Note: Although the Tip: There are three ways to cut the content of an element:
Applies toThe
Browser Support |
Example:
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>
Example:
HTML
<!DOCTYPE html>
<html>
<body>
<p contenteditable="true" oncut="myFunction()">Try to cut this text</p>
<script>
function myFunction() {
alert("You cut text!");
}
</script>
</body>
</html>
html oncut attribute |
Read Full: | HTML Attribute |
Type: | Develop |
Category: | Web Tutorial |
Sub Category: | HTML Attribute |
Uploaded by: | Admin |
Views: | 124 |
Reffered: https://www.w3schools.com/tags/att_oncut.asp