![]() |
| |||
| Please help me with this code heres what the code should look like in somewhat plain english: If this month = January to March {Hello} Else {Goodbye} Can anyone come up with the code? I just started using javascript so i couldnt really follow any tutorials..its all cut and paste for me. Thanks in advance! |
| |||
| <SCRIPT language = JavaScript> var my_month=new Date() var month_name=new Array(12); month_name[0]="January" month_name[1]="February" month_name[2]="March" month_name[3]="April" month_name[4]="May" month_name[5]="June" month_name[6]="July" month_name[7]="August" month_name[8]="September" month_name[9]="October" month_name[10]="November" month_name[11]="December" c = month_name[my_month.getMonth()]; if (c == "January" || c == "February" || c == "March") { alert("Hello : " + c) } else { alert("Goodbye : " + c) } </SCRIPT> |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| css code??? | Lucia99 | Webdesign & HMTL | 2 | 01-02-2008 05:11 AM |
| Adsense Code? | warhammer | Monetization | 7 | 10-29-2007 09:59 PM |
| Css Help: How To Cancel Css On a Particular Code? | DonGigi | Webdesign & HMTL | 1 | 09-26-2006 04:45 PM |
| I have css code on a website telling links to change color and it works. I put this same css code? | dondi | Webdesign & HMTL | 4 | 06-30-2006 06:44 PM |
| Can PHP read in source code from another webpage external of the server to which the PHP code is run on? | abrahamthomas | PHP | 5 | 06-30-2006 12:53 PM |