javascript新手,求助
<script type="text/javascript">
var webPan=
{
first:function(x){return x.firstChild||x.firstChild.nextSibling},
next:function(x)
{
do{x=x.nextSibling}
while(x&&x.nodeType!=1);
return x;
},
set:function(x,_1,_2,_3){
this.next(x).style.display = _1;
this.first(x).className = this.first(x).className.replace(_2,_3);
},
init:function(){
var _this=this,_0='mo_title_r1',_1='mo_title_r2';
function $(o){return document.getElementById(o)};
this.win=[];
for (var i=0;i<arguments.length;++i ) {
var _i=this.first($(arguments[i]));
this.set(_i,'none',_0,_1);
_i.onclick=function (){
if(_this.prev&&_this.prev!=this){_this.set(_this.prev,'none',_0,_1)};
var _2=_this.first(this).className.indexOf(_1) == 0?['',_1,_0]:['none',_0,_1];
_this.set(this,_2[0],_2[1],_2[2]);
_this.prev=this;
}
}
}
};
请问里面类似first:function(x)中冒号:是什么意思,是定义函数的一种方式吗?
怎么我看过只有 function first{}; 这种方式 或者 var first = function{}; 方式怎么没见过上面这种,是我理解错了吗?
谢谢!