var data="123|搜索|等等"; var strs= new Array(); //定义一数组 strs=data.split("|"); //字符分割 for (i=0;i<strs.length ;i++ ) { strs[i] }