Forum : page error
Brief description  about Online courses   join in Online courses
View nishant  gaurav 's Profile

page error

<html>

<form name=frm>
day:<input type = "text" name= txtnum size = 5 value="">
month:<input type = "text" name= txtmon size = 5 value="">
year:<input type = "text" name= txtyear size = 5 value="">
<p>
<input type= "button" name=b1 value="get date" onclick="getdate()">
</form>
<head>
<script type="text/javascript">
function getdate()
{
A=eval(document.frm.txtnum.value);
B=document.frm.txtmon.value
C=eval(document.frm.txtyear.value);
if(A == 1)
{
alert("date is" A "st of" B "," C")
}
else if(A == 2)
{
alert("date is" A "nd of" B "," C")
}
else if(A == 3)
{
alert("date is" A "rd of" B "," C")
}
else
{
alert("date is" A "th of" B "," C")
}
}
</script>
</head>
</html>
its not giving the output, please guide me to the output.
Asked by nishant gaurav | Sep 3, 2010 |  Reply now
Replies (1)
View teacher siliconindia 's Profile
Hi Nishant,

Buddy u stop writing form above head section.. i already told u once i think..... include it in body and call the respective JS function.

and also check for 21 22 23 dates also.
Sep 8, 2010