<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>var order = []; <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>} <br> </div>