1 頁 (共 1 頁)

checkbox 全選

發表於 : 2008-12-22 10:41:27
yehlu
<script>
function checkAll(field) {
var i;
if (this.document.form.elements[field][0].checked == true){
for (i = 0; i < this.document.form.elements[field].length; i++) this.document.form.elements[field].checked = false;
}else{
for (i = 0; i < this.document.form.elements[field].length; i++) this.document.form.elements[field].checked = true;
}
}
</script>


$form->button("selectasll","全選/取消全選","checkAll('goods_tran_ida[]')");