摘要: 1.属性表达式属性表达式计算是发生在作用域中的。Javascript默认是以window为作用域的。AngularJS要使用window作用域的话得用$window来指向全局window对象。 比如说,你使用window中定义的alert()方法,在AngularJS表达式中必须写成$window.... 阅读全文
posted @ 2014-10-18 23:07 未来动力 阅读(209) 评论(0) 推荐(0) 编辑
摘要: 1 //比较两种方式的不同,方式二会出现抖动的bug 2 3 $(document).ready(function(e) { 4 5 //方式一 6 $('#cont').hover ( fu... 阅读全文
posted @ 2014-10-18 18:52 未来动力 阅读(778) 评论(0) 推荐(0) 编辑
摘要: var now = moment(1410181234567)var formatted = now.format('YYYY-MM-DD HH:mm:ss')console.log(formatted) 阅读全文
posted @ 2014-10-18 17:42 未来动力 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 1 2 3 4 5 1 #top{width:100%;height:50px;border:1px solid red;}2 .nav{width:1080px;height:50px;background:green;margin:0px auto;}3 .scoll_... 阅读全文
posted @ 2014-10-18 13:47 未来动力 阅读(308) 评论(0) 推荐(0) 编辑