bob*_*obo 3 javascript php datetime date utc
我想有一个javascript日期对象根据Web服务器设置其时间.
<script type="text/javascript">
var date=new Date();
date.setTime(<?php echo time() ?>);
alert(date.toString()); //displays the date and time according to the timezone set on the client's computer
</script>
Run Code Online (Sandbox Code Playgroud)
以上代码是否可靠?
非常感谢大家.
| 归档时间: |
|
| 查看次数: |
788 次 |
| 最近记录: |