逻辑问题,移动
HaveAnyThing="";
的位置,如下
if(HaveAnyThing!="NOTHING")
{
addItem(mObj);
}
else
{
mObj.length=0;
alert(HaveAnyThing+THEID);
HaveAnyThing="";
}