Js control i access 2
Thu Oct 03 2024 04:23:08 GMT+0000 (Coordinated Universal Time)
Saved by
@adsj
<!DOCTYPE html>
<html>
<head>
<title>Programming Contest</title>
<style>
body {
font-family: Arial, sans-serif;
text-align: center;
background-color: #f9f9f9;
}
h2 {
margin-top: 20px;
}
.editor-container {
display: inline-block;
text-align: left;
margin-top: 20px;
}
textarea {
width: 500px;
height: 200px;
border: 2px solid red;
padding: 10px;
font-family: monospace;
}
.instructions {
font-size: 14px;
margin-right: 10px;
}
</style>
</head>
<body>
<h2>Programming Contest</h2>
<div class="editor-container">
<label class="instructions">Type code here</label>
<textarea id="editor" oncut="warning()" oncopy="warning()" onpaste="warning()">
#include<stdio.h>
int main() {
printf("Hello World");
return 0;
}
</textarea>
</div>
<script>
function warning() {
alert('Cut/Copy/Paste is restricted.');
}
</script>
</body>
</html>
content_copyCOPY
Comments