转载自:http://www.cnblogs.com/qiantuwuliang/archive/2010/09/01/1814706.html
Array.prototype.remove=function(dx)
{
if(isNaN(dx)||dx>this.length){return false;}
for(var i=0,n=0;i<this.length;i++)
{
if(this[i]!=this[dx])//这一步实在太妙了
{
this[n++]=this[i]
}
}
this.length-=1
}
Array.prototype.baoremove = function(dx)
{
if(isNaN(dx)||dx>this.length){return false;}
this.splice(dx,1);
}