上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 14 下一页
摘要: Number.MIN_VALUE常量说明Number.MIN_VALUE表示的最小值为5e-324MIN_VALUE代表的并不是负最小,而是最接近0的一个数负最小值可以使用-Number.MAX_VALUE表示 阅读全文
posted @ 2014-02-13 11:26 鍒樻爧 阅读(1051) 评论(0) 推荐(0) 编辑
摘要: 翻译自stackoverflow:http://stackoverflow.com/questions/1646698/what-is-the-new-keyword-in-javascriptnew做了4件事情1,生成一个新的对象object,他的类型是一个简单的object2,把构造函数的外部,可访问的,prototype对象设置到这个新对象的内部,不可访问的,prototype上3,执行构造函数,在有this的地方统统指向这个新对象4,返回这个新对象,除非返回值是非原始类型。如果是非原始类型,就返回该值 阅读全文
posted @ 2014-01-27 18:01 鍒樻爧 阅读(297) 评论(0) 推荐(0) 编辑
摘要: 不错的一张图 阅读全文
posted @ 2014-01-26 14:53 鍒樻爧 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 源地址:https://developer.mozilla.org/zh-CN/docs/JavaScript/Reference/Global_Objects/Object/create#.E4.BD.BF.E7.94.A8Object.create.E5.AE.9E.E7.8E.B0.E5.8E.9F.E5.9E.8B.E7.BB.A7.E6.89.BF概述创建一个拥有指定原型和若干个指定属性的对象.Method ofObjectImplemented inJavaScript 1.8.5ECMAScript EditionECMAScript 5th Edition语法Object.cr 阅读全文
posted @ 2014-01-26 13:47 鍒樻爧 阅读(1066) 评论(0) 推荐(0) 编辑
摘要: 源地址:http://www.html-js.com/article/1717虽然JavaScript中已经自带了很多内建引用类型,你还是会很频繁的需要创建自己的对象。JavaScript编程的很大一部分都是在操纵对象。深入理解JavaScript对象是怎么运行的是全面理解JavaScript的一个关键。记住JavaScript中的对象是动态的,这意味着他们可以在任何代码执行的地方被修改。不像基于类的语言在定义类时就锁定了对象,JavaScript中的对象没有这些限制。定义属性回忆一下第一章中有两种创建自己对象的方法,使用Object构造器或者使用对象字面量表示法。例如:var person1 阅读全文
posted @ 2014-01-26 13:34 鍒樻爧 阅读(396) 评论(0) 推荐(0) 编辑
摘要: 源地址:http://www.html-js.com/article/1763#h4让我们先来快速回顾一下几个基于选择器查询的库例如jQuery额Zepto。你可能对下面的语法感到很熟悉:var $items = $('.items'); 一旦你查询了某些元素,你就可以在这些元素上做很多事情,比如添加类($.el.addClass(’active’)),插入其他元素,添加事件监听器,等等。元素 VS. API当你调用$(selector)时,返回的是一个匹配的DOM元素的数列,同时API方法作为属性连同这些元素一起成为了一个对象。为了将元素和属性合并起来,最佳的选择可能是将元素 阅读全文
posted @ 2014-01-26 13:23 鍒樻爧 阅读(304) 评论(0) 推荐(0) 编辑
摘要: 源地址:http://www.catswhocode.com/blog/10-handy-and-reusable-jquery-code-snippetsSmooth scrolling to top of pageLet’s start this list by a very popular and useful snippet: Those 4 lines will allow your visitors to smooth scrool to the top of the page simply by clicking a a link (with#topid) located at 阅读全文
posted @ 2014-01-22 13:44 鍒樻爧 阅读(472) 评论(0) 推荐(0) 编辑
摘要: : 11, 13 s/a/b/cg 阅读全文
posted @ 2013-12-25 13:51 鍒樻爧 阅读(340) 评论(0) 推荐(0) 编辑
摘要: // First create the eventvar myEvent = new CustomEvent("userLogin", { detail: { username: "davidwalsh" }});//Listener event myElement.addEventListener("userLogin", function(e) { console.info("Event is: ", e); console.info("Custom data is: ", e.detail 阅读全文
posted @ 2013-12-11 12:56 鍒樻爧 阅读(125) 评论(0) 推荐(0) 编辑
摘要: Mongodb 操作Start MongoDBThe MongoDB instance stores its data files in the/var/lib/mongoand its log files in/var/log/mongo, and run using themongoduser account. If you change the user that runs the MongoDB process, youmustmodify the access control rights to the/var/lib/mongoand/var/log/mongodirectorie 阅读全文
posted @ 2013-11-30 21:15 鍒樻爧 阅读(1116) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 14 下一页