摘要: function timestampToTime(timestamp) { var date = new Date(timestamp * 1000);//时间戳为10位需*1000,时间戳为13位的话不需乘1000 var Y = date.getFullYear() + '-'; var M = 阅读全文
posted @ 2020-11-18 11:02 YH丶浩 阅读(680) 评论(0) 推荐(0) 编辑
摘要: //随机数 var num = Math.ceil(Math.random() * 3) console.log(num); //随机数组 var a = ['1','2','3','4','5']; console.log(a[parseInt(Math.random() * a.length)] 阅读全文
posted @ 2020-11-17 17:23 YH丶浩 阅读(496) 评论(0) 推荐(0) 编辑
摘要: <!doctype html> <html lang="'en"> <head> <meta charset="UTF-8"> <title>Tab切换-自动</title> <script src="js/jquery.js"></script> </head> <style> .info-flo 阅读全文
posted @ 2020-11-17 15:43 YH丶浩 阅读(176) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document< 阅读全文
posted @ 2020-11-11 15:44 YH丶浩 阅读(974) 评论(0) 推荐(0) 编辑
摘要: <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="viewport" content="width=device-width, 阅读全文
posted @ 2020-11-02 12:02 YH丶浩 阅读(93) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document< 阅读全文
posted @ 2020-10-10 10:20 YH丶浩 阅读(197) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document< 阅读全文
posted @ 2020-10-10 10:17 YH丶浩 阅读(403) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>时钟</title 阅读全文
posted @ 2020-10-10 10:14 YH丶浩 阅读(193) 评论(0) 推荐(0) 编辑
摘要: function getUrlParam(name) { var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象 var r = window.location.search.substr(1).mat 阅读全文
posted @ 2020-09-25 09:52 YH丶浩 阅读(616) 评论(0) 推荐(0) 编辑
摘要: Date.prototype.Format = function(fmt) { // author: meizz var o = { "M+": this.getMonth() + 1, // 月份 "d+": this.getDate(), // 日 "h+": this.getHours(), 阅读全文
posted @ 2020-09-25 09:45 YH丶浩 阅读(207) 评论(0) 推荐(0) 编辑