Chapman Posted April 16, 2010 Report Share Posted April 16, 2010 (edited) man vajag php mainigajam pieskirt vertibu no JS. ka es to varu izdarīt? JS: <script type="text/javascript"> var currentTime = new Date() var month = currentTime.getMonth() + 1 var day = currentTime.getDate() var year = currentTime.getFullYear() document.write(year + "." + month + "." + day) </script> Edited April 16, 2010 by Chapman Quote Link to comment Share on other sites More sharing options...
rATRIJS Posted April 16, 2010 Report Share Posted April 16, 2010 (edited) AJAX EDIT: vispaar es ceru, ka tu saproti, ka pa tiesho to nevar izdariit. AJAX ir wild guess nezinot ko tu iisti veelies panaakt. To pashu current time var izdabuut arii ar pliku PHP. Ir iemesls kaadeelj tu tur izmanto JS? Edited April 16, 2010 by rATRIJS Quote Link to comment Share on other sites More sharing options...
Леший Posted April 16, 2010 Report Share Posted April 16, 2010 Cik saprotu, cilvēks mēģinā dabūt lietotāja datora date/time. Nav labākais risinājums tā darīt, labāk no datora, vai pēc IP noteikt GMT offsetu. Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted April 16, 2010 Report Share Posted April 16, 2010 Nu, bet varbūt, ka viņš grib noskaidrot servera un datora pulksteņu rādījumu starpību :) Quote Link to comment Share on other sites More sharing options...
Леший Posted April 16, 2010 Report Share Posted April 16, 2010 Aleksej, ar GMT offsetu to protams nevar panākt :P Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted April 16, 2010 Report Share Posted April 16, 2010 Protams, ka nevar! Tu taču nezini, ka manam datoram nosēdusies CMOS batareja un katra diena iesākas kā 1994 gada 6. jūnijs... :P Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.