摘要: <script> $(function() { // 事件绑定 // 第一种方式 $("#btn").click(function() { alert("1 : Hello,jQuery!"); }); // 第二种方式 $("#btn2").bind("click", function() { a 阅读全文
posted @ 2019-12-10 16:52 萌胖次 阅读(70) 评论(0) 推荐(0)
摘要: 1. 基本选择器 // 标签选择器 : 所有标签为td的元素 console.log($("td")); // ID选择器 : ID为td1的元素 console.log($("#td1")); // 类选择器 console.log($(".txtColor")); // 所有class属性值为t 阅读全文
posted @ 2019-12-10 11:50 萌胖次 阅读(124) 评论(0) 推荐(0)