restructured

Code Samples of CH8-CH11 was restructured
This commit is contained in:
Diablo_xDSD
2024-01-19 17:37:31 +03:00
parent f20632ab9e
commit ea15a3c75d
28 changed files with 0 additions and 0 deletions
@@ -0,0 +1,23 @@
<html>
<body>
<body>
<div id="wrapper">JavaScript is fun!</div>
<input type="text" name="myNum1" onkeypress="numCheck()">
<input type="text" name="myNum2" onkeypress="numCheck2()">
<script>
function numCheck() {
message("Number: " + !isNaN(event.key));
return !isNaN(event.key);
}
function numCheck2() {
message("Not a number: " + isNaN(event.key));
return isNaN(event.key);
}
function message(m) {
document.getElementById('wrapper').innerHTML = m;
}
</script>
</body>
</html>