多选效果如下图 代码如下: 复制代码 代码如下: <!-- <BR>$(document).ready(function() { <BR>$("#selectall").click(selectAll); <BR>}); <BR>function selectAll() { <BR>var checked = $("#selectall").attr("checked"); <BR>$(".selectable").each(function() { <BR>var subchecked = $(this).attr("checked"); <BR>if (subchecked != checked) <BR>$(this).click(); <BR>}); <BR>} <BR>// --> Item Name UM Ordered Qty Received Qty Quantity Remark $i = 1; foreach($this->details as $item) { echo "\n"; echo "\n"; //item name echo "" . $item["item_name"] . " \n"; //unit echo "" . $item["unit_name"] . "\n"; //Ordered Qty echo "" . $item["quantity"] . "\n"; //Received Qty echo "" . $item["received_qty"] . "\n"; //Quantity echo "\n"; //Remark column echo ""; echo "\n"; $i++; } ?> 局部多选如下图 代码 复制代码 代码如下: <!-- <BR>function selectAllMenu(cmb) { <BR>var checked = cmb.checked; <BR>$(".selectable[model=" + cmb.model + "]").each(function() { <BR>var subchecked = $(this).attr("checked"); <BR>if (subchecked != checked) <BR>$(this).click(); <BR>}); <BR>} <BR>// --> if (isset($this->user)) { echo "Privilege Setting For User " . $this->user .""; } elseif (isset($this->role)) { echo "Privilege Setting For Role " . $this->role . ""; } else { echo "Privilege Setting"; } ?> $model_name = ""; foreach($this->privileges as $privilege) { if ($model_name != $privilege['model_name']) { $model_name = $privilege['model_name']; echo "\n"; echo " \n"; echo " $model_name\n"; echo "\n"; } echo "\n"; echo " \n"; echo " \n"; echo " " . $privilege['display_text'] . "\n"; echo "\n"; } ?> $button_panel = new ButtonPanel(); $button_panel->setButtonAlign("center"); $button_panel->addButton(array("text" => "Save", "type" => "submit")); $button_panel->addButton(array("text" => "Reset", "type" => "reset")); $button_panel->addButton(array("text" => "Back", "onclick" => "window.history.back();")); $button_panel->render(); ?>