Home  >  Article  >  Web Front-end  >  js使用数组判断提交数据是否存在相同数据_javascript技巧

js使用数组判断提交数据是否存在相同数据_javascript技巧

WBOY
WBOYOriginal
2016-05-16 17:12:031717browse
复制代码 代码如下:

var productIds = $(".productId");
var arry = new Array();
arry = productIds;
var ary=arry.sort();
for(var i=0;iif(ary[i].value==ary[i+1].value){
alertMsg.confirm("检测到药品相同,请检查!", {
});
return;
}
}
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn