![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
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 · 956 阅读 · 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 · 387 阅读 · 0 评论 -
js日期处理
/---------------------------------------------------// 判断闰年 //---------------------------------------------------Date.prototype.isLeapYear = function(){return(0==th转载 2015-05-13 11:34:03 · 514 阅读 · 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 · 710 阅读 · 0 评论