//判断数组是否包含某个值
var nArr = new Array();nArr.push('123');nArr.push('345');
if (nArr.indexOf(234) != -1) { alert('存在');} else { alert('不存在');}