Home > Web Front-end > JS Tutorial > js uses an array to determine whether the same data exists in the submitted data_javascript skills

js uses an array to determine whether the same data exists in the submitted data_javascript skills

WBOY
Release: 2016-05-16 17:12:03
Original
1802 people have browsed it
Copy code The code is as follows:

var productIds = $(".productId");
var arry = new Array();
arry = productIds;
var ary=arry.sort();
for(var i=0;i if(ary[i].value==ary[i 1].value){
alertMsg.confirm("The same medicines were detected, please check!", {
});
return;
}
}
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template