Welcome aboard! We are happy you are here and wish you good net-raft!
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
function MyChange() {
var myString = document.getElementById("MyInput");
var letters = /^[0-9]*$/;
if (myString.value.match(letters)) {
alert("isNumber");
}
else {
alert('Please type numeric characters only');
}
}
</script>
</head>
<body>
Type a number or text <input type="text" id="MyInput"></p>
<button onclick="MyChange()">check</button>
</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