<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"); 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><br></ary.length-1> </div>