Js/Mootools
Nisherman
守得云开见月明
展开
-
Js - 获取url地址栏
url:http://www.x2y2.com:80/fisker/post/0703/window.location.html?ver=1.0&id=6#imhere 1.window.location.href:返回整个url串 2.window.location.protocol:返回协议部分,本例中为 http: 3.window.location.host : 返回主机转载 2015-04-07 15:23:58 · 348 阅读 · 0 评论 -
Mootools - Cookie操作
转载:http://www.cnblogs.com/daizhj/articles/1291584.html 方式一: Cookie.write(name, value); Cookie.read(name); 方式二: Hash.Cookie.set //设置,相当于写操作 Hash.Cookie.get //获取,相当于读操作转载 2015-04-07 15:14:44 · 343 阅读 · 0 评论 -
Mootools 其实有个类似Jquery的live方法的东西
解决办法就是Mootools的 Element.Delegation Element.Delegation的介绍: Extends the Element type to include event-delegation in its event system. Event delegation is a common practice where an event listener i原创 2015-07-10 16:50:00 · 391 阅读 · 0 评论 -
使用hasOwnProperty过滤原型链上下来的属性
实例代码如下: //申明我们的对象 var monkey = { hands:2, legs:2, heads:1, job: 'PHP' }; //下面是在原型上增加了一个名为clone的方法 if(typeof Object.prototype.clone == 'undefined'){ Object.prototype.clone = function(){}原创 2016-07-04 15:18:12 · 1789 阅读 · 0 评论