摘要: function stopPropagation(e){ e.stopPropagation();//阻止事件冒泡 e.preventDefault();//阻止默认行为 reset sumbit a[href] return false; } $(".child").click(function( 阅读全文
posted @ 2021-11-10 10:36 六月沉 阅读(52) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2021-11-10 10:15 六月沉 阅读(44) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2021-11-09 11:35 六月沉 阅读(21) 评论(0) 推荐(0)
摘要: 123 阅读全文
posted @ 2021-11-09 09:20 六月沉 阅读(123) 评论(0) 推荐(0)
摘要: // $("li:frist") // $("li:eq(0)").css("color","red"); // $("li:gt(2)").css("color","green"); // $("li:lt(2)").css("color","blue"); // $("li:parent").c 阅读全文
posted @ 2021-11-08 12:05 六月沉 阅读(16) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2021-11-08 10:36 六月沉 阅读(9) 评论(0) 推荐(0)
摘要: // console.log(li.parentElement); 父 // console.log(li.parentNode); // console.log(ul.childrenNodes) 文本节点 子 // console.log(ul.children) 不包括文本节点 // cons 阅读全文
posted @ 2021-11-05 15:04 六月沉 阅读(41) 评论(0) 推荐(0)
摘要: // li.style.background-color = "#ccc"; // li.style.backgroundColor = "#ccc"; // li.style["background-color"]="#ccc"; 阅读全文
posted @ 2021-11-05 14:36 六月沉 阅读(192) 评论(0) 推荐(0)
摘要: function Student(id,name){ this.id = id; this.name = name; this.eat = function(food){ console.log("吃"+food); return this; }, this.sleep = function(){ 阅读全文
posted @ 2021-11-04 16:37 六月沉 阅读(36) 评论(0) 推荐(0)
摘要: function Student(id,name){ this.id = id; this.name = name; this.scores= [ {subject:"html",scpres:"90"}, {subject:"JS",scpres:"90"}, ] } Student.protot 阅读全文
posted @ 2021-11-04 16:23 六月沉 阅读(34) 评论(0) 推荐(0)