Posted in Javascript onFebruary 22, 2013
<script> function c1(){ var d = document.getElementsByName("s")[0].value; var b = (new Date(d)).getTime(); document.getElementsByName("s")[0].value = b; } function c2(){ var d = document.getElementsByName("d")[0].value; var b = new Date(d); b.setTime(d); document.getElementsByName("d")[0].value = b; } </script> 转毫秒<input name="s" value=""><input type="button" onclick="c1()" value="ssss" > 转日期<input name="d" value=""><input type="button" onclick="c2()" value="dddd" >
js时间日期和毫秒的相互转换
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@