700字范文,内容丰富有趣,生活中的好帮手!
700字范文 > js获取当前时间戳 仿PHP函数模式

js获取当前时间戳 仿PHP函数模式

时间:2020-05-29 23:50:14

相关推荐

js获取当前时间戳 仿PHP函数模式

函数:

/*** 获取时间戳函数* 仿PHP函数模式*/function time(){var this_time = Date.parse(new Date());this_time = ''+this_time;this_time = this_time.substring(0,10);this_time = parseInt(this_time);return this_time;}

用法:

alert(time());

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。