This is a discussion on Show the next seven days in a drop down list. within the HTML, CSS and Javascript Coding Techniques forums, part of the Web Development category; Hi all... Can anyone tell me how can i show the next seven days in a drop down list. Thanks ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Hi all... <script language="JavaScript"> var now = new Date(); now = new Date(now.getFullYear(),now.getMonth(),now.getDate( ),0,0,0); // midnight var text = '<form><select>'; for (i=0; i<7; i++) { var theDay = new Date(now.getTime()+(i*24*60*60*1000)); text += '\n<option> ' + theDay.getFullYear() + '/' + (theDay.getMonth()+1) + '/' + theDay.getDate(); } text += '</select></form>'; document.write(text); </script> Thanks... |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Show the number of days, hours and seconds till Y3K. | itbarota | HTML, CSS and Javascript Coding Techniques | 1 | 03-10-2008 01:28 AM |
| How Can I show tool tip for the dropdown list ? | kingmaker | HTML, CSS and Javascript Coding Techniques | 2 | 01-18-2008 02:11 AM |
| How can I change the contents of a drop down select list? | itbarota | HTML, CSS and Javascript Coding Techniques | 1 | 10-29-2007 08:14 AM |
| double clicking the option in drop down list menu | vijayanand | HTML, CSS and Javascript Coding Techniques | 3 | 08-06-2007 07:27 AM |
| List in Google in Just 7 days | vadivelanvaidyanathan | 3 | 04-26-2007 01:21 PM | |