js
肖恩小羊
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
js 面向对象练习
function Student(name,age){ this.name=name; this.age=age; } Student.hello="Hello World"; Student.prototype.sayHello=function(){ return this.name+"--"+this.age+"--"+Student.hello; };原创 2015-01-07 20:58:25 · 1039 阅读 · 0 评论 -
js 数组去重
Array.prototype.unique = function() { var n = {}, r = [], len = this.length, val, type; for (var i = 0; i val = this[i]; type = typeof val; if (!n[val]) {原创 2015-03-25 15:24:31 · 442 阅读 · 0 评论 -
js日期处理
/--------------------------------------------------- // 判断闰年 //--------------------------------------------------- Date.prototype.isLeapYear = function() { return (0==th转载 2015-05-13 11:34:03 · 580 阅读 · 0 评论 -
angularjs $emit $broadcast $on 通讯
$emit只能向parent controller传递event与data$broadcast只能向child controller传递event与data$on用于接收event与data 例子如下 html代码 div ng-controller="ParentCtrl"> 父级--> div ng-controller="SelfCtrl"转载 2015-05-22 09:48:10 · 788 阅读 · 0 评论
分享