11 2012 档案

摘要:当地址栏含有参数,我们可以再目标页面通过window.location.search来获取我们需要的参数及其值// 获取地址栏的参数数组function getUrlParams(){ var search = window.location.search ; // 写入数据字典 var tmparray = search.substr(1,search.length).split("&"); var paramsArray = new Array; if( tmparray != null) { for(var i = 0;i<tmpar... 阅读全文
posted @ 2012-11-27 17:21 园林鸟 阅读(5503) 评论(0) 推荐(0)
摘要:网摘:ie下可以直接使用event对象的这三个属性现在我们需要为FF新增这三个属性:if(window.addEventListener) { FixPrototypeForGecko(); } function FixPrototypeForGecko() { HTMLElement.prototype.__defineGetter__("runtimeStyle",element_prototype_get_runtimeStyle); window.constructor.prototype.__defineGetter__("event",win 阅读全文
posted @ 2012-11-20 14:45 园林鸟 阅读(1214) 评论(0) 推荐(0)
摘要:网摘:Firefox的私有属性,导致以下问题的出现:按钮左右本身有2px的间距(FF私有属性写了padding:0 2px所致);按钮文字居中是不行的(此时设置padding-bottom是没用的) ;等等…input[type="reset"]::-moz-focus-inner,input[type="button"]::-moz-focus-inner,input[type="submit"]::-moz-focus-inner,input[type="file"] > input[type=" 阅读全文
posted @ 2012-11-20 10:50 园林鸟 阅读(531) 评论(0) 推荐(0)
摘要:网摘:在ie下这连个函数主要是向目标元素对象插入一个新的子元素,子元素可以使element也可以是html代码片段由于FF中没有这两个函数,因此我们可以通过扩展HTMLElement来解决这个问题:if(typeof HTMLElement!="undefined" && !HTMLElement.prototype.insertAdjacentElement){ HTMLElement.prototype.insertAdjacentElement = function(where,parsedNode) { switch (where) { ... 阅读全文
posted @ 2012-11-19 14:08 园林鸟 阅读(1542) 评论(1) 推荐(0)