摘要: 一、js判断, 给底部加padding适配。 $(document).ready(function () { iphoneX(); function iphoneX() { var userAgent = navigator.userAgent; var ios = !!userAgent .mat 阅读全文
posted @ 2019-07-22 15:04 执笔画浮尘· 阅读(2459) 评论(1) 推荐(1) 编辑
摘要: var idcardReg = /^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$|^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X|x)$/; va 阅读全文
posted @ 2019-07-17 14:27 执笔画浮尘· 阅读(329) 评论(0) 推荐(0) 编辑
摘要: 在单页面应用vue项目中只能在index.html或App.vue中添加统计代码 const script = document.createElement('script') script.type = 'text/javaScript' //var text = script.textConte 阅读全文
posted @ 2019-06-26 10:25 执笔画浮尘· 阅读(1223) 评论(0) 推荐(0) 编辑
摘要: 在beforeCreate中用js添加样式 在beforDestory钩子中用js移除样式beforeCreate: function() { document.getElementsByTagName("body")[0].className="active"; }, beforeDestroy: 阅读全文
posted @ 2019-06-26 10:18 执笔画浮尘· 阅读(1209) 评论(0) 推荐(0) 编辑
摘要: 一、地址参数只有一个参数 http://localhost:8080/#/libraryDetail?spread_number=66796 getUrlParam: function(paraName) { let url = document.location.toString(); let a 阅读全文
posted @ 2019-06-25 09:39 执笔画浮尘· 阅读(563) 评论(0) 推荐(0) 编辑
摘要: <input type="text" autocapitalize="off" autocorrect="off"> 阅读全文
posted @ 2019-06-17 16:27 执笔画浮尘· 阅读(868) 评论(0) 推荐(0) 编辑