摘要: jquery判断checked的三种方法: .attr(‘checked’): //看版本1.6+返回:”checked”或”undefined” ;1.5-返回:true或false.prop(‘checked’): //16+:true/false.is(‘:checked’): //所有版本: 阅读全文
posted @ 2016-11-07 11:48 胡红霞 阅读(196) 评论(0) 推荐(0)
摘要: jq 获取元素的方式 方式一 Css常用属性 1.圆角:border-radius 2.投影:box-shadow 3.图文居中:vertical-align:text-bottom; 4.光标:cursor 5.光标禁止:cursor: not-allowed; 6.毛玻璃特效: -webkit- 阅读全文
posted @ 2016-10-25 15:35 胡红霞 阅读(99) 评论(0) 推荐(0)
摘要: 全选与反选<script language="javascript"> function submit() { var data = [], all =allcheck.querySelectorAll('input'); for (var i = all.length, curr; i--;) { 阅读全文
posted @ 2016-10-25 14:39 胡红霞 阅读(143) 评论(0) 推荐(0)
摘要: 方式1,splice 1 2 3 var ary = [1,2,3,4]; ary.splice(0,ary.length); console.log(ary); // 输出 [],空数组,即被清空了 1 2 3 var ary = [1,2,3,4]; ary.splice(0,ary.lengt 阅读全文
posted @ 2016-10-25 14:33 胡红霞 阅读(186) 评论(0) 推荐(0)
摘要: 1. Margin: 包括margin-top, margin-right, margin-bottom, margin-left, 控制块级元素之间的距离, 它们是透明不可见的。 例如: margin-top: 50px;margin-right: 50px;margin-bottom: 50px 阅读全文
posted @ 2016-07-19 11:47 胡红霞 阅读(275) 评论(0) 推荐(0)