help editing a javascript |
![]() ![]() |
help editing a javascript |
Jun 27 2009, 02:41 PM
Post
#1
|
|
|
Member ![]() ![]() Posts: 95 OS: windows xp |
help with the following javascript code
could someone explain how this code would work? i need to understand it, and is it possible to make the link disapear on a certin date, and can you refine the appear and disapear to a specific time as well? script><script type="text/javascript"> var display_date=new Date('04/04/2008');//this will be the date the link starts displaying var currentTime = new Date(); var month = currentTime.getMonth() + 1; var day = currentTime.getDate(); var year = currentTime.getFullYear(); //get all dates in the same format var current_date = new Date(month +'/' + day + '/' + year); if(current_date>=display_date){ document.write('<a href="newlink.html">new link</a>'); } </script> This post has been edited by thero_cpd: Jun 27 2009, 02:44 PM |
|
|
![]() ![]() |
Similar Topics
| Topic Title | Replies / Views | Topic Information | |||||
|---|---|---|---|---|---|---|---|
![]() |
19 / 1,619 | 12th June 2005 - 08:20 PM XOXclueless_kcXOX started - last by ssone |
|||||
![]() |
3 / 518 | 13th July 2008 - 11:12 PM Jacksown started - last by Jacksown |
|||||
![]() |
0 / 350 | 29th August 2008 - 04:14 PM emaan9301 started - last by emaan9301 |
|||||
![]() |
0 / 124 | 21st October 2009 - 03:03 PM scherisaki started - last by scherisaki |
|||||
|
Time is now: 21st November 2009 - 11:48 PM |
Advertisements do not imply our endorsement of that product or service. The forum is run by volunteers who donate their time and expertise. We make every attempt to ensure that the help and advice posted is accurate and will not cause harm to your computer. However, we do not guarantee that they are accurate and they are to be used at your own risk. All trademarks mentioned on this page are the property of their respective owners.
© Geeks to Go, Inc. | All Rights Reserved | Privacy Policy | Advertising