
js
文章平均质量分 89
牛肉胡辣汤
牛肉胡辣汤
展开
-
万能window.close()
function closeWin() { try { window.opener = window; var win = window.open("","_self"); win.close(); top.close(); } catch (e) { alert(e); } }原创 2020-12-12 11:05:17 · 2585 阅读 · 0 评论 -
js中将字符串转日期的函数,亲测兼容所有ie
/** * 字符串转时间(yyyy-MM-dd HH:mm:ss) * result (分钟) */ String.prototype.stringToDate = function(){ var fullDate = this.split(" ")[0].split("-"); var fullTime = this.split("原创 2016-10-09 11:47:20 · 1247 阅读 · 2 评论 -
毫秒数转时分秒
vartime =312350000; function Datetime(time){ time = time/1000; var h=0,m=0,s=0; var s = time%60; if(time/60-s var m = ((time-s)/60)%60; if(((time-s)/60)/60-m var h = ((time-原创 2016-10-09 11:54:10 · 2061 阅读 · 1 评论