2016年5月17日

去除对象中值为null、undefined、“”的字段

摘要: 对象转字符串去除无效字段 阅读全文

posted @ 2016-05-17 09:04 lweiruil 阅读(2971) 评论(0) 推荐(0) 编辑

2016年5月16日

JS对象转字符串保留方法,字符串转对象

摘要: var obj = { name:"zhangsan", age:20, say:function(name){ console.log("My name is " + (name ? name : this.name)); }, hello:f... 阅读全文

posted @ 2016-05-16 15:28 lweiruil 阅读(2018) 评论(0) 推荐(0) 编辑

2016年3月15日

web获取当前城市

摘要: http://pv.sohu.com/cityjson?ie=utf-8 阅读全文

posted @ 2016-03-15 10:51 lweiruil 阅读(454) 评论(0) 推荐(0) 编辑

2015年11月30日

js禁用回退键[backspace键]浏览历史跳转的解决办法

摘要: 1 window.onload=function(){ 2 /**************************** 3 * 作者:q821424508@sina.com * 4 * 时间:2012-08-20 * 5 *... 阅读全文

posted @ 2015-11-30 10:48 lweiruil 阅读(324) 评论(0) 推荐(0) 编辑

2015年10月14日

自定义浏览器滚动条的样式,打造属于你的滚动条风格

摘要: 前段时间,到网上找素材时,看到了一个很个性的滚动条式,打开Chrome的调试工具看了一下,发现不是用JavaScript来模拟实现的,觉得有必要折腾一下。于是在各大浏览器中对比了一下,发现只用Chrome适用,也就是说这个用的是Chrome的私有CSS属性。便百之谷之后,发现原来不仅仅只用Chrom... 阅读全文

posted @ 2015-10-14 14:57 lweiruil 阅读(794) 评论(0) 推荐(0) 编辑

2015年10月13日

js获取时区

摘要: function getTimezoneName() { tmSummer = new Date(Date.UTC(2005, 6, 30, 0, 0, 0, 0)); so = -1 * tmSummer.getTimezoneOffset(); tmWinter = new D... 阅读全文

posted @ 2015-10-13 12:29 lweiruil 阅读(425) 评论(0) 推荐(0) 编辑

2015年5月15日

嵌套span间隙问题

摘要: 父元素添加 font-size:0px; line-height:0px; overflow:hidden; 阅读全文

posted @ 2015-05-15 09:26 lweiruil 阅读(266) 评论(0) 推荐(0) 编辑

2015年4月28日

解决IE6不支持position:fixed的Bug

摘要: /* 除IE6浏览器的通用方法 */.ie6fixedTL{position:fixed;left:0;top:0}.ie6fixedBR{position:fixed;right:0;bottom:0}/* IE6浏览器的特有方法 *//* 修正IE6振动bug */* html,* html b... 阅读全文

posted @ 2015-04-28 13:25 lweiruil 阅读(129) 评论(0) 推荐(0) 编辑

2015年4月17日

解决手机页面中点击文本框,网页放大问题

摘要: 阅读全文

posted @ 2015-04-17 15:34 lweiruil 阅读(206) 评论(0) 推荐(0) 编辑

2014年9月15日

jQuery滑动到锚点

摘要: jQuery滑动到锚点 阅读全文

posted @ 2014-09-15 16:16 lweiruil 阅读(202) 评论(0) 推荐(0) 编辑

导航