摘要: function ___getPageScroll() { var xScroll, yScroll; if (window.innerHeight && window.scrollMaxY) { xScroll = window.innerWidth + window.scrollMaxX; yScroll = window.innerHeight + window.scrollMaxY; ... 阅读全文
posted @ 2011-09-01 16:54 leamiko 阅读(295) 评论(0) 推荐(0)
摘要: Fiddler配合phoenix,则网页结构尽收眼底。phoenix是Firefox下面查看xhtml css javascript的轻量级工具,它还具有压缩以及格式化脚本的功能。另外有个在线版格式化javascript:http://jsbeautifier.org/。 Fiddler的3要点 1、捕捉 2、过滤 开启过滤器的设置 3、嗅探 查看 Request Headers 以及 Response Headers 具体使用过程 1)配置好过滤器,如下图,一般情况下,对主机、响应类型和尺寸进行简单设置即可,主要是为了避免,捕捉阶段出现太多不需要... 阅读全文
posted @ 2011-08-30 18:12 leamiko 阅读(451) 评论(0) 推荐(0)
摘要: <script type="text/javascript"> 如果你想写 if (!false) { alert('false'); } 不妨考虑写成: false || alert('false'); false || alert('false'); true || alert('true'); //output false; 用"||"的情况下,第一个条件true,不检测第二个直接返回tr... 阅读全文
posted @ 2011-08-23 14:58 leamiko 阅读(4453) 评论(0) 推荐(0)
摘要: 天气预报数据源 天气预报数据源测试 http://m.weather.com.cn/data/101280601.html 深圳 http://m.weather.com.cn/data/101240601.html 吉安 天气预报数据源获取 http://m.weather.com.cn/data/101240601.html 这里,101240601即为城市id id怎么获取? 通过 http... 阅读全文
posted @ 2011-08-19 15:05 leamiko 阅读(19474) 评论(2) 推荐(2)
摘要: 我想不仅仅是NodeJS,当我们要引入任何一种新技术前都必须要搞清楚几个问题: 1.我们遇到了什么问题? 2.这项新技术解决什么问题,是否契合我们遇到的问题? 3.我们遇到问题的多种解决方案中,当前这项新技术的优势体现在哪儿? 4.使用新技术,带来哪些新问题,严重么,我们能否解决掉? 阅读全文
posted @ 2011-08-17 13:21 leamiko 阅读(234) 评论(0) 推荐(0)
摘要: "命名规则" Camel 标记法 首字母是小写的,接下来的单词都以大写字母开头。 28 如, var myTestValue = 0, mySecondTest = "hi" Pascal 标记法 首字母是大写的,接下来的单词都以大写字母开头。 如, var MyTestValue = 0, MySecondTest = "hi" 匈牙利类型 标记法 在以Pascal标记法命名的变量前... 阅读全文
posted @ 2011-05-29 21:59 leamiko 阅读(300) 评论(0) 推荐(0)
摘要: $(function() { $('img').click(function() { $('img[clicked="true"]').removeAttr('clicked').css('border-color', '#999'); $(this).css('border-color', '#f00').attr('clicked', true); }); }) 阅读全文
posted @ 2011-05-15 11:26 leamiko 阅读(321) 评论(0) 推荐(0)
摘要: String.prototype.trim=function(){return this.replace(/(^\s*)|(\s*$)/g,"");} 阅读全文
posted @ 2011-05-09 17:27 leamiko 阅读(130) 评论(0) 推荐(0)
摘要: var data="{ root: [ {name:'1',value:'0'}, {name:'6101',value:'北京市'}, {name:'6102',value:'天津市'} ] }"; 阅读全文
posted @ 2011-05-07 15:24 leamiko 阅读(143) 评论(0) 推荐(0)
摘要: test 阅读全文
posted @ 2011-05-07 15:16 leamiko 阅读(114) 评论(0) 推荐(0)
document.getElementById('MySignature') && document.getElementById('MySignature').style.display = "none"; document.getElementById('MySignature') && document.getElementById('blog_post_info').style.display = "none";