for(i=0; i<1000; i++) { if (test[i].substr(0, 2) == "上海"){ alert("good! test[" + i + "]"); } }
JavaScript极速狂飙:大容量字符数组的快速检索_meizz http://community.csdn.net/Expert/TopicView1.asp?id=4497092 我已经开贴专门讨论这类大容量的数据检索问题了。var test = new Array(1000); var a = test.join("\n").match(/\B上海.*/g); alert(a);
if (test[i].substr(0, 2) == "上海"){
alert("good! test[" + i + "]");
}
}
http://community.csdn.net/Expert/TopicView1.asp?id=4497092
我已经开贴专门讨论这类大容量的数据检索问题了。var test = new Array(1000);
var a = test.join("\n").match(/\B上海.*/g);
alert(a);