15FuncObjIV - The Date Object : Application Application:...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
The Date Object : Application Application: The Date Navigator The page contains dd, mm, yyyy fields for a date. Users can type in these fields. Two buttons are available for moving the date forward and backward by one day. On loading, the date fields are initialized to the current date. <body onload=" setup() "> <h2>Date  Na vig a to r</h2> <fo rm  na m e ="F1" > <input type =" te xt"  nam e =" d"  s ize =" 2"/> / <input type =" te xt"  nam e =" m "  s ize =" 2"/> / <input type =" te xt"  nam e =" y"  s ize =" 2" />  (dd/m m /yyyy)<br/> <input type =" butto n"  va lue =" ne xt da y"   o nc lic k=" showNextDay() "/> <input type =" butto n"  va lue =" pre vio us  da y"  o nc lic k=" showPrevDay() "/> </fo rm >
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
/Initia lize  the  date  fie lds  to  c urre nt da y. unction   setup () var  today =ne w Date ; //c urre nt date  and tim e do c um e nt.F1.d.value =to da y.g e tDate (); do c um e nt.F1.m .value =to day.g e tMo nth() +1 ; do c um e nt.F1.y.value =to day.g e tYe ar();
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/10/2012 for the course CS 1301 taught by Professor Dr.wong during the Winter '08 term at City University of Hong Kong.

Page1 / 4

15FuncObjIV - The Date Object : Application Application:...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online