随笔分类 -  js

摘要:javascript中防止重复点击、防止点击过快实用方法 转自i https://blog.csdn.net/jiangwei1994/article/details/80774214 阅读全文
posted @ 2019-09-06 18:05 enych 阅读(203) 评论(0) 推荐(0)
摘要:window.onload = function () { var lis = document.getElementById("list").getElementsByTagName("li"); for (var i = 0; i < lis.length; i++) { lis[i].addE 阅读全文
posted @ 2019-09-06 10:36 enych 阅读(1174) 评论(0) 推荐(0)
摘要:第一种 报错 var t = JSON.parse(""); console.log(t); 第二种 正常 var t = JSON.parse('{"AA":"BB"}'); console.log(t); 第三种 报错 var t = JSON.parse('{AA:"BB"}'); console.log(t); 第四种 报错 var t = JSON.parse('{"AA":BB}'); 阅读全文
posted @ 2019-09-04 19:17 enych 阅读(359) 评论(0) 推荐(0)
摘要:var t = document.getElementById("provid"); console.log(t.value); console.log(t.text); //未定义 console.log(t.selectedIndex); //有效 var text = t.options[t.selectedIndex].text; // 选中文本 var value = t.o... 阅读全文
posted @ 2019-09-03 13:48 enych 阅读(8239) 评论(0) 推荐(0)
摘要:var sheng = document.getElementById("sheng"); var falge =0; sheng.onclick = function() { if(this.parentNode.classList.contains('linkage-selected')){ //... 阅读全文
posted @ 2019-09-03 11:18 enych 阅读(681) 评论(0) 推荐(0)
摘要:///*第一种情况 */ //var mycars = new Array() //mycars[0] = 0; //mycars[1] = 1; //mycars[2] = 2; //function tee(arry) { // arry[1] = 100; // ... 阅读全文
posted @ 2019-05-23 12:01 enych 阅读(218) 评论(0) 推荐(0)
摘要:浏览器 local Storage 是解决cookies存储空间不足问题. cookle中每条cookie的存储空间为4K. local storage 的存储空间一般为5M.这个根据浏览器变化. local storage 的值类型限定为string类型.如果存储内容多的话会导致页面变卡. loc 阅读全文
posted @ 2019-03-09 09:35 enych 阅读(1185) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2019-02-27 12:18 enych 阅读(0) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2019-02-26 17:24 enych 阅读(204) 评论(0) 推荐(0)
摘要:var table = document.getElementById("table1"); var t1 = GetTableData(table); var newstr = JSON.stringify(t1); //返回一个新字符串 阅读全文
posted @ 2019-01-14 16:00 enych 阅读(649) 评论(0) 推荐(0)
摘要:; !function (win) { var tt1 = 10; //内部私有 , var tt2 = 20; //内部私有 //test.prototype.tt1 = 0;//共有变量 var test = function () {}; test.prototyp... 阅读全文
posted @ 2019-01-07 19:27 enych 阅读(970) 评论(0) 推荐(0)
摘要:十进制 十六进制 二进制 右移>>4 十进制值 15 F 0000 1111 0000 0 16 10 0001 0000 0001 1 31 1F 0001 1111 0001 1 32... 阅读全文
posted @ 2019-01-05 17:10 enych 阅读(1355) 评论(0) 推荐(0)
摘要:第二种 会出现问题 阅读全文
posted @ 2019-01-03 17:20 enych 阅读(248) 评论(0) 推荐(0)
摘要:$("#btnAdd1").click(function () { console.log($("form").serialize()); var checkboxs = document.getElementsByName("checkbox[]"); var check_val = []; ... 阅读全文
posted @ 2018-12-12 18:05 enych 阅读(2001) 评论(0) 推荐(0)
摘要:var ele = ev.parentNode; var elem_child = ele.childNodes; for (var i = 0 in elem_child) { //遍历子元素数组 if (elem_child[... 阅读全文
posted @ 2018-12-12 10:58 enych 阅读(150) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2018-12-10 10:37 enych 阅读(232) 评论(0) 推荐(0)
摘要:var body = document.getElementsByTagName("body")[0]; body.addEventListener("mousemove", outpostion); function outpostion() { console.log("全局"+event.clientX + "/" + event.clientY);... 阅读全文
posted @ 2018-12-08 09:47 enych 阅读(8190) 评论(0) 推荐(0)
摘要:把delete更改为mydelete正常. 阅读全文
posted @ 2018-11-29 08:41 enych 阅读(813) 评论(3) 推荐(0)
摘要:get 发送数据 (没有测试) var formData = new FormData(); formData.append("sets", sets); var posturl = "/123/456/789"; post(posturl, formData); 阅读全文
posted @ 2018-11-26 22:52 enych 阅读(419) 评论(0) 推荐(0)
摘要:这个在C#中怎么接收? 阅读全文
posted @ 2018-11-16 23:16 enych 阅读(392) 评论(0) 推荐(0)