摘要:
Css:div { width: 100px; margin: 0 auto; } .onoff { display: inline-block; position: relati... 阅读全文
摘要:
js 无缝切换CSS.clearfix { clear: both; }.banner { width: 500px; height: 500px; overflow: hidden; margin: 0 auto; position: relative; background: url(../im... 阅读全文
摘要:
正则表达式用户名: '(\w[- . +]?){5,30}'邮箱: '\w+[@]\w+[-]?\w+[.]\w+'密码:重复密码: 身份证: '\d{17}[X x \d]{1}'电话号码: '\d{11,12}|\d{3,4}[- ]?\d{7,8}|\d{7,8}'验证... 阅读全文
摘要:
第一种方法:function getLastDay(year,month) { var new_year = year; //取当前的年份 var new_month = month++;//取下一个月的第一天,方便计算(最后一天不固定) ... 阅读全文
摘要:
1、off() 用法////$('a')[0].onclick = null; 原生的可用这种方式// off()函数用于移除元素上绑定的一个或多个事件的事件处理函数// off()函数主要用于解除由on()函数绑定的事件处理函数 // 原生的事件,如onclick、onmouseo... 阅读全文
摘要:
1、一元运算符2、二元运算符3、三元运算符4、h5中div可设置是否能编辑的属性,当然如果在p、span标签什么的也是可以的 5、css3 去掉下拉框后面的三角形 ,去掉之后,若想在后面换成其他的什么图片背景就很容易了select {appearance:none;-moz-appearance:n... 阅读全文
摘要:
1、event.preventDefault() 阻止默认行为链接// 阻止默认行为 e.preventDefault(); $("a").click(function(){ event.preventDefault(); ... 阅读全文
摘要:
// 合并对象 // 深度合并 var result_1 = $.extend( true, {}, { name: "John", location: {city: "Boston",county:"USA"} }, ... 阅读全文
摘要:
.ellipsis {white-space:nowrap;text-overflow:ellipsis;overflow:hidden;} //文字超出显示省略号::selection { background: #f0f; color: #fff} // 更改文字选中的颜色 阅读全文