-
Jul 12th, 2013, 05:02 AM
#1
Thread Starter
Frenzied Member
get server date/time
how can I get the server date/time using javascript?
-
Jul 12th, 2013, 08:17 AM
#2
Re: get server date/time
you don't... javascript runs on the client... not the server...
well, that's not 100% accurate... you can get the time in JS, but you still have to run something on the server, get the time, then return it back to the JS...
-tg
-
Jul 21st, 2013, 06:53 PM
#3
Fanatic Member
Re: get server date/time
if you wish to get the server time, i would suggest using php or any other server sided language like asp inside the javascript function
Code:
alert("<?php echo date("H:i:s", time()); ?>");
http://php.net/manual/en/function.date.php
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|