|
Definition and UsageThe Note: Although the Tip: There are three ways to cut the content of an element:
Applies toThe
Browser Support
|
<!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>
<p contenteditable="true" oncut="myFunction()">Try to cut this text</p>
<script>
function myFunction() {
alert("You cut text!");
}
</script>
</body>
</html>
| html oncut attribute |
Type: | Develop |
Category: | Web Tutorial |
Sub Category: | HTML Attribute |
Uploaded by: | Admin |
Read Articlehttps://develop.horje.com/learn/1434/reference