日期:2014-05-18  浏览次数:20641 次

关于JS的简单问题
uniqueInteger.counter   =   0;
function   uniqueInteger(){
return   uniqueInteger.counter++;
}
这里的uniqueInteger.counter是怎么一回事,为什么会先于函数使用
而counter又是在哪里定义的

------解决方案--------------------
js若类型 可以不用var直接定义变量


------解决方案--------------------
可以直接这么写的。