I was wondering if i could get some help on trying to get this page to accept an input, then spit out whether or not it was a valid input or not.
So far I have written this.
<html>
<head>
<title>JavaScript Date Strings</title>
<link rel="stylesheet" href="jsdatestrings.css" />
<script src="http://code.jquery.com/jquery.js"></script>
</head>
<body>
<h1 id="title">JavaScript Popup and Validation</h1>
<img class="popup-btn" src="death.jpg" />
<p>Das Datum (mm/dd/yyyy): <input id = "date" type="text" name="date"></p>
<script>
$(document).ready(function(){
$("input").blur(function(){
var x = $("#date").val();
$("#test").html(x);
});
});
</script>
<p id="test">HERRO!</p>
</body>
</html>
I am not very sure how to get it and work with it. I know the input is working but I need to get something like 09281990 and it should give me something like 09/28/1990 and if I set it to yyyy-mm-dd then it should read it as invalid unless i put 19900928.
Any help would be welcomed. Thank you.