<script>
function check()
{
var dateCheck = /^(0?[1-9]|[12][0-9]|3[01])$/;
var monthCheck = /^(0[1-9]|1[0-2])$/;
var yearCheck = /^\d{4}$/;
var a =document.myform.date.value;
var b=document.myform.month.value;
var c=document.myform.year.value;
if(a.match(dateCheck))
{
alert ("date is ok");
}
else
{
alert ("date is not ok");
}
if(b.match(monthCheck))
{
alert ("month is ok");
}
else
{
alert ("month is not ok");
}
if(c.match(yearCheck))
{
alert ("year is ok");
}
else
{
alert ("year is not ok");
}
}
</script >
<form name=myform>
Enter Date:<input type=text name=date>
Enter Month:<input type=text name=month>
Enter year<input type=text name=year>
<INPUT name="Submit" type="button" class="style2" onclick="javascript:check();" value="Submit">
</form>
function check()
{
var dateCheck = /^(0?[1-9]|[12][0-9]|3[01])$/;
var monthCheck = /^(0[1-9]|1[0-2])$/;
var yearCheck = /^\d{4}$/;
var a =document.myform.date.value;
var b=document.myform.month.value;
var c=document.myform.year.value;
if(a.match(dateCheck))
{
alert ("date is ok");
}
else
{
alert ("date is not ok");
}
if(b.match(monthCheck))
{
alert ("month is ok");
}
else
{
alert ("month is not ok");
}
if(c.match(yearCheck))
{
alert ("year is ok");
}
else
{
alert ("year is not ok");
}
}
</script >
<form name=myform>
Enter Date:<input type=text name=date>
Enter Month:<input type=text name=month>
Enter year<input type=text name=year>
<INPUT name="Submit" type="button" class="style2" onclick="javascript:check();" value="Submit">
</form>
informative blog for fresher
ReplyDeletei must say if fresher can follow your blog so he she don't need to join any course or other institute they can learn java script from your blog
https://sisgain.com/hire-android-developer