随笔分类 - JaveScript
摘要:http://datav.aliyun.com/tools/atlas/#&lat=31.769817845138945&lng=104.29901249999999&zoom=4
阅读全文
摘要:function sleep(n) { var start = new Date().getTime(); while(true) { if(new Date().getTime() - start > n) break; } }
阅读全文
摘要:JavaScript JSONPath example | JSON tutorial | w3resource This is an example of JavaScript with JSONPath
阅读全文
摘要:zTree = $.fn.zTree.getZTreeObj("treeDemo");//treeDemo界面中加载ztree的div var node = zTree.getNodeByParam("id",pid ); zTree.cancelSelectedNode();//先取消所有的选中状态 zTree.selectNode(node,true);//将指定ID的节点选中 zTree....
阅读全文
摘要:function HTMLEncode(html) { var temp = document.createElement("div"); (temp.textContent != null) ? (temp.textContent = html) : (temp.innerText = html); var output = temp.innerHTML; te...
阅读全文
摘要:if(window.top window.self) {//不存在 }
阅读全文
摘要:生成html代码之前: $(".main_body_con").mCustomScrollbar("destroy"); html添加到页面之后: $(".main_body_con").mCustomScrollbar(); 例如: var html = ''; $(".main_body_con").mCustomScrollbar("destroy"); $('body').ap...
阅读全文
摘要:1 function changeURLPar(url, ref, value) { 2 var str = ""; 3 if (url.indexOf('?') != -1) 4 str = url.substr(url.indexOf('?') + 1); 5 else 6 return url + "?" + ref + ...
阅读全文
摘要:HTML表格导出到EXCEL 第一列 第二列 第三列 a b 1 2 3 4 ...
阅读全文
摘要:1234567891011121314151617181920212223242526272829 data数据格式:1,a,a1,a21,b,b1,b21,c,c1,c22,d,d1,d22,e,e1,e2 写成如下格式:var code = { '1' : { 'a' : ['a1', 'a2'
阅读全文
摘要:1 事件注册 2 3 平常我们绑定事件的时候用dom.onxxxx=function(){}的形式 4 这种方式是给元素的onxxxx属性赋值,只能绑定有一个处理句柄。 5 但很多时候我们需要绑定多个处理句柄到一个事件上,而且还可能要动态的增删某个处理句柄 6 下面的事件注册...
阅读全文
摘要:var treeObj = $.fn.zTree.getZTreeObj("treeDemo");var node = treeObj.getNodeByParam("id", "370000");treeObj.selectNode(node);setting.callback.onClick =...
阅读全文
摘要:a.html hello world!!! b.html 哈哈点击
阅读全文
摘要:var treeObj = $.fn.zTree.getZTreeObj("tree");var nodes = treeObj.getSelectedNodes();if(typeof nodes[0].children.length>0){ //为父节点}
阅读全文
摘要:New Document 1111 2222 aaaa aaaa ...
阅读全文