摘要: 1、筛选器: 经常使用的筛选器有以下几个: $('#i1').next() 找当前id的下一个标签 $('#i1').nextAll() 找到下面所有的标签 $('#i1').nextUntil('#ii1') 找下面的标签,直到找到 ii1 $('#i1').prev() 找到当前id的上一个标签 阅读全文
posted @ 2020-04-08 20:11 凸凸yolotheway 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 1、jquery的筛选器 筛选器:在选择器选择到的所有的基础上在选择一次 $(this).next() 下一个 $(this).prev() 上一个 $(this).parent() 父 $(this).children() 孩子 $('#i1').siblings() 兄弟 $('#i1').fi 阅读全文
posted @ 2020-04-06 17:38 凸凸yolotheway 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 1、使用prop方法 (1)$('#tb :checkbox').prop('checked'); 获取值 $('#tb :checkbox').prop('checked',true); 设置值 (2)jquery方法内置循环:$('#tb :checkbox').xxxx 例如 $('#tb : 阅读全文
posted @ 2020-04-06 12:00 凸凸yolotheway 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 1、jQuery是DOM、BOM、JavaScript的类库 2、jQuery与Dom转换 <div id="i1">123</div> <script src="jquery-1.12.4.js"></script> <script> $('#i1') //查找id为i1的内容 </script> 阅读全文
posted @ 2020-04-05 17:18 凸凸yolotheway 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 1、Dom绑定时间的方式,可以使用addEventListener,这样控制台中输出的文本不会被覆盖 <head> <meta charset="utf-8"> <title></title> <style> #test{ background-color: red; width: 300px; h 阅读全文
posted @ 2020-03-31 19:10 凸凸yolotheway 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 1、对15周的后台管理左侧菜单进行了优化: <head> <meta charset="UTF-8"> <title>Title</title> <style> .hide{ display:none; } .item .header{ height:35px; background-color:b 阅读全文
posted @ 2020-03-31 11:09 凸凸yolotheway 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 1、有一个表格,当鼠标移动到某行时,该行变红,移除时,变为白色 <body> <table border="1" width="300px"> <tr onmouseover="t1(0);" onmouseout="t2(0);"> <td>1</td> <td>2</td> <td>3</td> 阅读全文
posted @ 2020-03-29 18:36 凸凸yolotheway 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 1、事件: 行为 样式 结构 相分离的页面 js css html 绑定事件的两种方式: (1)直接标签绑定,onclick='xxx()'; (2)先获取Dom对象,然后进行绑定 document.getElementById('xx').onclick document.getElementBy 阅读全文
posted @ 2020-03-29 17:25 凸凸yolotheway 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 1、定时分为单次定时器跟多次定时器 (1)单次定时器 setTimeout 单次定时器; clearTimeout 清除单次定时器 var obj=setTimeout(function(){},1000) clearTimeout(obj); (2)多次定时器 setInterval 多次定时器 阅读全文
posted @ 2020-03-29 16:54 凸凸yolotheway 阅读(261) 评论(0) 推荐(0) 编辑
摘要: 1、input标签中 submit可以进行提交,而在js中,任何标签可以通过Dom提交表单 <form id="f1" action="http://www.baidu.com"> <input type="text" /> <input type="submit" value="提交" /> <a 阅读全文
posted @ 2020-03-25 11:35 凸凸yolotheway 阅读(145) 评论(0) 推荐(0) 编辑