数组push一个new function遇到的坑.
<script type="text/javascript">
<!--
function doit(){
//Todo
var exist = false;
for (var i=0,ilen=arr.length; i<ilen; i++) {
if (arr[i] instanceof bb) {
exist = true;
break;
}
}
if (!exist) {
arr.push(new bb());
}
}
function bb() {
arr.push(this);
}
var arr = [];
//-->
</ script>
<button type="button" onclick="doit()">doit</button>