Welcome aboard! We are happy you are here and wish you good net-raft!
<!DOCTYPE html>
<html>
<body>
<input id="test" type="text">
<button type="button" onclick="myFunc()">Click</button>
<p id="record"></p>
<script>
function myFunc() {
var message, x;
message = document.getElementById("record");
message.innerHTML = "";
x = document.getElementById("test").value;
try {
if(isNaN(x)) throw "is not a number";
if(!isNaN(x)) throw "is a number";
}
catch(err) {
message.innerHTML = "Input " + err;
}
}
</script>
</body>
</html>
The most helpful JAVASCRIPT solutions
How can I get the last day and the next day in javascript ?JAVASCRIPT Click to see more ... 5.8K 507