I am working on a problem and desperately need help!
I need to prompt a user for the numerical month of birth, day of birth and
year of birth and store it in varialbes and the use the variables to build a
date object. Then print the resulting date object, in it's full form. on
the screen using document.write. This IS for school and I think I am
starting out right, but can't quite seem to grasp what I am doing wrong, or
where to go from here. Any tips would be greatly appreciated.
Here is what I have so far...
<script>
var mob=prompt("Wha t is your month of birth, numerically?", "04");
var dob=prompt("Wha t is the date of your birth, numerically?", "07");
var yob=prompt("Wha t is the year of your birth, numerically?", "1967");
month.setMonth( mob-1);
day.setDate(dob );
year.setFullYea r(yob);
document.write( "Your birthday is " + date + "<br>");
</script>
KL
I need to prompt a user for the numerical month of birth, day of birth and
year of birth and store it in varialbes and the use the variables to build a
date object. Then print the resulting date object, in it's full form. on
the screen using document.write. This IS for school and I think I am
starting out right, but can't quite seem to grasp what I am doing wrong, or
where to go from here. Any tips would be greatly appreciated.
Here is what I have so far...
<script>
var mob=prompt("Wha t is your month of birth, numerically?", "04");
var dob=prompt("Wha t is the date of your birth, numerically?", "07");
var yob=prompt("Wha t is the year of your birth, numerically?", "1967");
month.setMonth( mob-1);
day.setDate(dob );
year.setFullYea r(yob);
document.write( "Your birthday is " + date + "<br>");
</script>
KL
Comment