h5 jq实现瀑布流

摘要: <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatibl 阅读全文
posted @ 2019-11-19 16:39 旺仔小裤头 阅读(369) 评论(0) 推荐(0) 编辑

jQuery省级联动

摘要: 百度网盘demo 阅读全文
posted @ 2019-11-15 15:17 旺仔小裤头 阅读(103) 评论(0) 推荐(0) 编辑

js jquery 常用函数集合

摘要: getAttribute:根据属性值,获取到属性名querySelector:返回匹配指定选择器的第一个元素addEventListener:事件委托,事件冒泡(一般是在js中的写的html,需要触发事件时使用) ,,,,,,,,,,,,,,,,,,,,,,,,,,, 1.appendTo:动态创建 阅读全文
posted @ 2019-11-14 11:07 旺仔小裤头 阅读(220) 评论(0) 推荐(0) 编辑

h5 富文本编辑器

摘要: 第一种:wangEditor(地址:https://www.kancloud.cn/wangfupeng/wangeditor3/332599) 首先需要引入js <script type="text/javascript" src="https://unpkg.com/wangeditor@3.1 阅读全文
posted @ 2019-11-13 16:58 旺仔小裤头 阅读(6679) 评论(0) 推荐(1) 编辑

向上取整,向下取整,四舍五入等

摘要: 1.只保留整数部分(丢弃小数部分)parseInt(5.1234);// 5 2.向下取整(<= 该数值的最大整数) 需注意当有16位小数,且数字偏向与+1时,自动加一Math.floor(5.1234);// 5 Math.floor(5.11111111111111111111111111111 阅读全文
posted @ 2019-11-13 15:05 旺仔小裤头 阅读(521) 评论(0) 推荐(0) 编辑

前端常用的三大缓存

摘要: 1.cookie(客户端,数据不能超过4k,关闭浏览器后缓存失效) ①原生js document.cookie="name" + "=" + '张三' + ";" let con=document.cookie.split(";")[0].split('=') console.log(con); / 阅读全文
posted @ 2019-11-12 15:30 旺仔小裤头 阅读(495) 评论(0) 推荐(0) 编辑

jquery 跳转,刷新,返回,判断浏览器型号

摘要: 第一步引入jquery <script src="http://code.jquery.com/jquery-2.1.4.min.js"></script> 跳转到其他页面: 第一种方法.$(location).attr('href','1.html')//在需要跳转的地方放入 第二种方法.wind 阅读全文
posted @ 2019-11-12 10:38 旺仔小裤头 阅读(200) 评论(0) 推荐(0) 编辑

百度地图使用

摘要: 百度地图生成ak地址:http://lbsyun.baidu.com/apiconsole/key 1.根据位置获取到经纬度 ①第一种方法:(ak必须要是服务端) http://api.map.baidu.com/geocoding/v3/?address=地址名&output=json&ak=自己 阅读全文
posted @ 2019-11-12 09:58 旺仔小裤头 阅读(276) 评论(0) 推荐(0) 编辑

jquery随机数生成

摘要: Math.random().toString(36).slice(2,8)//r07yxl 结果举例 阅读全文
posted @ 2019-11-11 17:22 旺仔小裤头 阅读(792) 评论(0) 推荐(0) 编辑

原生小程序 wxs使用

摘要: github地址:https://developers.weixin.qq.com/miniprogram/dev/framework/view/wxs/ js: 阅读全文
posted @ 2019-10-31 17:16 旺仔小裤头 阅读(233) 评论(0) 推荐(0) 编辑