- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
HTML oncut Event Attribute
The HTML oncut event attribute is triggered when user cuts the content of an HTML element in an HTML document.
Syntax
Following is the syntax −
<tagname oncut=”script”></tagname>
Example
Let us see an example of HTML oncut event Attribute −
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> body { color: #000; height: 100vh; background-color: #FBAB7E; background-image: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%); text-align: center; padding: 20px; } p { font-size: 1.1rem; } </style> </head> <body> <h1>HTML oncut Event Attribute Demo</h1> <p oncut="get()">I'm a paragraph HTML element with some dummy text.</p> <p style="color:#db133a;">Now try to cut above paragraph text.</p> <div class="show"></div> <script> function get() { document.body.style.background = "lightblue"; } </script> </body> </html>
Output
Now try to cut the content of paragraph element to observe how oncut event attribute work.
Advertisements