JS- Control Ststements i-assess 2) Question
Sat Oct 05 2024 05:40:33 GMT+0000 (Coordinated Universal Time)
Saved by
@signup
#html
#javascript
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Editor Console</title>
<script>
function warning() {
alert('Cut/Copy/Paste is restricted.');
}
</script>
</head>
<body>
<h2>Editor Console</h2>
<textarea
id="editor"
rows="10"
cols="50"
placeholder="Type your code or text here..."
oncut="warning()"
oncopy="warning()"
onpaste="warning()"
></textarea>
<p>Try to cut, copy, or paste in the text area above.</p>
</body>
</html>
content_copyCOPY
Comments