<div class="codetitle"> <span><a style="CURSOR: pointer" data="56963" class="copybut" id="copybut56963" onclick="doCopy('code56963')"><u>複製程式碼</u></a></span> 程式碼如下:</div> <div class="codebody" id="code56963"> <br>function getValues_ByName() { <br> <br>function getValues_ByName() { <br>> 🎜>$("[name=chkbox_id]:checked").each(function () { <br>order.push($(this).val()); <br>}); <br>var values = order.join(','); <br>if (values == "") { <br>alert("選項不能為空!"); <br>return; <br>} else { <br>alert (values); <br>} <br>} </div>