<div class="codetitle"> <span><a style="CURSOR: pointer" data="32893" class="copybut" id="copybut32893" onclick="doCopy('code32893')"><u>复制代码</u></a></span> 代码如下:</div> <div class="codebody" id="code32893"> <br>var productIds = $(".productId"); <br>var arry = new Array(); <br>arry = productIds; <br>var ary=arry.sort(); <br>for(var i=0;i<ary.length-1>if(ary[i].value==ary[i+1].value){ <br>alertMsg.confirm("检测到药品相同,请检查!", { <br>}); <br>return; <br>} <br>} <br></ary.length-1> </div>