2024年08月03日 可以配合layui树形菜单获取所有id var data = [ { "id":221, "title":"私密服务器", "children":[ { "title":"sec_外网云控", "id":32 }, { "title&qu

2024年08月02日 let treeOneChecked2 = []//把自己的数组放进去 //找出相同数组 function duplicates(treeOneChecked2) { var newArr=[]; treeOneChecked2.sort(); for(var i =0;i<treeOneChecked2.length;i++){ if(treeOneChecked2[i]==treeOneChecked2[i+1

2024年08月02日 浙里办项目中所有要调用ZWJSBridge方法之前必须先执行onReady初始化。 //ZWJSBridge初始化 ZWJSBridge.onReady(() => { console.log("初始化完成后,执行bridge方法"); }); //老年版和常规版判断 ZWJSBridge.getUiStyle({}).then(result => { console.log(result); }) .ca

2024年08月02日 //数据 let arr = [ {id:1,name:'北京',type:'985'}, {id:2,name:'上海',type:'985'}, {id:3,name:'天津',type:'211'}, {id:4,name:'广州',type:'985'}, {id:5,name:'深圳',type:&

2024年08月02日 PV日志埋点参数包含应用开发管理平台appId、应用开发管理平台应用名称、经度、纬度和用户类型。 1、先根据ZWJSBridge.getLocation获取经纬度 ZWJSBridge.onReady(() => { console.log("初始化完成后,执行bridge方法"); }); ZWJSBridge.getLocation().then((result) => { console.log('获取经纬

2024年08月02日 1、在需要局部刷新的div上定义一个id <div id="nums">内容</div> 2、js代码 $("#nums").load(location.href + " #nums>*", ""); 是不是很简单!

2024年08月02日 网页可见区域宽:document.body.clientWidth 网页可见区域高:document.body.clientHeight 网页可见区域宽:document.body.offsetWidth (包括边线的宽) 网页可见区域高:document.body.offsetHeight (包括边线的高) 网页正文全文宽:document.body.scrollWidth 网页正文全文高:document.body.scrollHeight 网页被卷去的高

2024年08月02日 参数介绍: elem:所要绑定的id元素 type:时间类型 range:设置分割字符 formate:时间类型 btns:需要显示的按钮,默认值:[‘clear’, ‘now’, ‘confirm’],清空、现在、确定 done:回调获取选中时间,需要回调后执行的方法都可以写在这里 laydate.render({ elem: '#datetime',

2024年08月02日 1、xAxis,axisLabel中倾斜45% xAxis: { nameLocation:'end',//坐标轴名称显示位置 axisLabel : {//坐标轴刻度标签的相关设置 interval:0, rotate:"45" } } 2、换行显示(限制每行显示的字数) axisLabel : { formatter : function(params){ var newPar

2024年08月02日 获取当前页面的缩放值,来修改样式! function detectZoom (){ var ratio = 0, screen = window.screen, ua = navigator.userAgent.toLowerCase(); if (window.devicePixelRatio !== undefined) { ratio = window.devicePixelRatio; } e

2024年08月02日 找到xAxis中axisLabel,添加以下语句 axisLabel: { formatter: function(params) { //用replace替换 return params.replace("原文本","自定义文本") } }

2024年08月02日 找到xAxis中,添加以下语句 minInterval:1

2024年08月02日 ["1","2","3","4","5"].map(Number); 结果输出: (5) [1, 2, 3, 4, 5]

2024年08月01日 $(window).scroll(function(){   var scrollTop = $(this).scrollTop();   var scrollHeight = $(document).height();   var windowHeight = $(this).height();   if(scrollTop + windowHeight == scrollHeight){     console.log("我已经到底!")

2024年08月01日 var num = 100; parseInt(num,2).toString(8) //二进制转八进制 parseInt(num,2) //二进制转十进制 parseInt(num,2).toString(16) //二进制转十六进制 parseInt(num,8).toString(2) //八进制转二进制 parseInt(num,8) //八进制转十进制 parseInt(num,8).toString(16) //八进制转十六

最新内容