Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions jsQ1.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title></title>
</head>
<body>
<input type="text"/>
<script>
var field = document.querySelector("input");
field.addEventListener("keypress",onkeypress = isAllowed);
function isAllowed(evt) {
var charCode = (evt.which) ? evt.which : event.keyCode
if (charCode === 65 || charCode === 85 || charCode === 79 || charCode === 67 || charCode === 78)
return false;

return true;
}
</script>
</body>
</html>