网站首页
高清电影
无损音乐
游戏攻略
电脑教程
破解资源
站长资源
软件下载
js按指定格式显示日期时间的样式代码
(编辑:jimmy 日期: 2024/10/10 浏览:
2
)
[Ctrl+A 全选 注:引入外部Js需再刷新一下页面才能执行]
时间为当前时间
复制代码
代码如下:
//1.2013-4-9 11:21:32
//2.2013年4月9日 11点21分32秒
//3.2013年4月9日 上午11点21分32秒
//4.2013年4月9日 下午13点21分32秒
/*
var thedate = new Date();
alert(thedate.getFullYear() + '-' + thedate.getMonth() + '-' + thedate.getDate() + ' ' + thedate.toLocaleTimeString());
alert(thedate.toLocaleDateString() + ' ' + thedate.getHours() + '点' + thedate.getMinutes() + '分' + thedate.getSeconds() + '秒');
if (thedate.getHours() < 12) {
alert(thedate.toLocaleDateString() + ' 上午' + thedate.getHours() + '点' + thedate.getMinutes() + '分' + thedate.getSeconds() + '秒');
}
else {
alert(thedate.toLocaleDateString() + ' 下午' + thedate.getHours() + '点' + thedate.getMinutes() + '分' + thedate.getSeconds() + '秒');
}
*/
上一篇:
JS 实现Json查询的方法实例
下一篇:
js弹出层(jQuery插件形式附带reLoad功能)
一句话新闻
高通与谷歌联手!首款骁龙PC优化Chrome浏览器发布
高通和谷歌日前宣布,推出首次面向搭载骁龙的Windows PC的优化版Chrome浏览器。
在对骁龙X Elite参考设计的初步测试中,全新的Chrome浏览器在Speedometer 2.1基准测试中实现了显著的性能提升。
预计在2024年年中之前,搭载骁龙X Elite计算平台的PC将面世。该浏览器的提前问世,有助于骁龙PC问世就获得满血表现。
谷歌高级副总裁Hiroshi Lockheimer表示,此次与高通的合作将有助于确保Chrome用户在当前ARM兼容的PC上获得最佳的浏览体验。
最新资源
秦咏.1997-歌咏诗情·历年名曲典故【音乐谷】【W
群星.1997-纯电影·电影歌曲剧照纪念篇【新艺宝】
邰肇玫.1981-雪歌(滚石25周年经典复刻系列)【滚
《Duck Side of the Moon》特色玩法介绍
《刀郎 辉煌10年绝版珍藏 3CD》[WAV/分轨][1.6G
《张韶涵 全面沦陷》[WAV/分轨][370MB]
《极品汽车音乐 三十而立 一起走过的岁月 2CD》
周冰倩1997-珍藏精选-真的好想你[WAV+CUE]
许廷铿2017《THEULTIMATECOLLECTION》2CD[星梦娱
徐小明1983-再向虎山行(LP版)[文志][WAV+CUE]
首页
音乐
电影
资源