上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 33 下一页
摘要: 1, var now = timestamp = Date.parse(new Date()) / 1000; console.log(now);输出: 1593856981 阅读全文
posted @ 2020-07-04 18:10 琥珀君 阅读(1705) 评论(0) 推荐(0) 编辑
摘要: 1, background-image: linear-gradient(45deg, red, yellow, blue); 阅读全文
posted @ 2020-07-04 17:28 琥珀君 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 1, var str="Hello world!" document.write(str.charAt(1)) e 2, 阅读全文
posted @ 2020-07-04 17:25 琥珀君 阅读(252) 评论(0) 推荐(0) 编辑
摘要: 全局查找字符串正则 window.workspace = 'D:/EsunOPUP/'; var UpFolder = 'OPSC/'; var OssPath = 'OPCloudC'; //此处后面不能加斜杠 // var OssPathReg = /OPCloudC\//g; // var O 阅读全文
posted @ 2020-07-04 17:06 琥珀君 阅读(374) 评论(0) 推荐(0) 编辑
摘要: 1,CSS样式: .progress { margin-top: 2px; width: 200px; height: 14px; margin-bottom: 10px; overflow: hidden; background-color: #f5f5f5; border-radius: 4px 阅读全文
posted @ 2020-07-04 15:52 琥珀君 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 1,刷新页面 //刷新页面 //默认为 false,从客户端缓存里取当前页。true, 则以 GET 方式,从服务端取最新的页面 window.location.reload(true); 阅读全文
posted @ 2020-07-04 14:48 琥珀君 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 1,获取后缀名 //得到后缀名 function get_suffix(filename) { pos = filename.lastIndexOf('.'); suffix = ''; if (pos != -1) { suffix = filename.substring(pos); } ret 阅读全文
posted @ 2020-07-04 11:46 琥珀君 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 1, //生成自动名 function random_string(len) { len = len || 32; var chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678'; var maxPos = chars.length; v 阅读全文
posted @ 2020-07-04 11:42 琥珀君 阅读(344) 评论(0) 推荐(0) 编辑
摘要: 1,代码块 $(function(){...}); 2, 阅读全文
posted @ 2020-07-03 16:19 琥珀君 阅读(690) 评论(0) 推荐(0) 编辑
摘要: 1,修改属性 //表示查找第一个.thmodList .thmodItem元素下的a元素,并修改属性href值 //$(".thmodList .thmodItem").eq(0).find("a").attr("href", data.data[i].url); 阅读全文
posted @ 2020-07-03 16:17 琥珀君 阅读(404) 评论(0) 推荐(0) 编辑
摘要: 1,循环添加内容 var html = ""; $.each(data.data, function(k, v) { html += '<div class="swiper-slide"><a href="javascript:;" data-name="' + v.name + '" data-s 阅读全文
posted @ 2020-07-03 16:12 琥珀君 阅读(4286) 评论(0) 推荐(0) 编辑
摘要: 1,获取url中指定的参数 //获取url中指定参数 function getParam(name) { var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); var URL = decodeURI(window.location.searc 阅读全文
posted @ 2020-07-03 15:20 琥珀君 阅读(215) 评论(0) 推荐(0) 编辑
摘要: 1, <script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script> <script type="text/javascript"> wx.ready(function() { wx.hideMenuItems({ menu 阅读全文
posted @ 2020-07-03 15:07 琥珀君 阅读(254) 评论(0) 推荐(0) 编辑
摘要: js是一门弱语言,它在声明变量时无需确定变量的类型,js在运行时会自动判断。那么如何判断一个变量的类型呢,js提供了typeof运算符,用来检测一个变量的类型。 1. typeof的语法 typeof是一个运算符,有2种使用方式:typeof(表达式)和typeof 变量名,第一种是对表达式做运算, 阅读全文
posted @ 2020-07-01 15:14 琥珀君 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 1,加入到集合中去 //定义变量var config = {}; // 加入集合 for (var i in obj) { config[i] = obj[i]; } // 调用 config['width'] 2,传入的键值对数据 var media = new VideoF().init({ / 阅读全文
posted @ 2020-07-01 14:47 琥珀君 阅读(835) 评论(0) 推荐(0) 编辑
摘要: 1,如果是顶层DIV ,要保持宽度和高度一致 可以直接定义宽度的尺寸为 10vw, 高度的尺寸也是 10vw,而不是10vh。 2,对不是顶层DIV,如何保持DIV 的宽度和高度一致: .iframe span { position: absolute; z-index: 2; top: 2%; l 阅读全文
posted @ 2020-06-30 11:21 琥珀君 阅读(856) 评论(0) 推荐(0) 编辑
摘要: 1,网址地址:https://dummyimage.com/ 示例1: https://dummyimage.com/400x300/ff3ff3&text=welcome! 400x300 : 为图片大小 ff3ff3 : 为图片颜色 &text=welcome! : & 后面为图片上的文字 ht 阅读全文
posted @ 2020-06-30 11:13 琥珀君 阅读(405) 评论(0) 推荐(0) 编辑
摘要: .iframe { width: 70%; height: 80%; top: 50%; left: 50%; transform: translate(-50%, -50%); position: fixed; z-index: 999; display: none; } 阅读全文
posted @ 2020-06-29 15:56 琥珀君 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 1,box-sizing:border-box; 属性 div.container { width:30em; border:1em solid green; } div.box { box-sizing:border-box; -moz-box-sizing:border-box; /* Fire 阅读全文
posted @ 2020-06-29 15:21 琥珀君 阅读(426) 评论(0) 推荐(0) 编辑
上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 33 下一页