Javascript 如何隐藏jQgrid中的所有复选框?
我需要隐藏jQgrid上的所有复选框,在阅读这两篇文章之后:Javascript 如何隐藏jQgrid中的所有复选框?,javascript,jquery,jqgrid,free-jqgrid,Javascript,Jquery,Jqgrid,Free Jqgrid,我需要隐藏jQgrid上的所有复选框,在阅读这两篇文章之后: 这就是我所做的: // this only hides the first checkbox on the header $('#gbox_grid_notification_queue').find('input[type="checkbox"]').hide(); // this does not hide anything at all $('#gbox_grid_notification_queue').find('
// this only hides the first checkbox on the header
$('#gbox_grid_notification_queue').find('input[type="checkbox"]').hide();
// this does not hide anything at all
$('#gbox_grid_notification_queue').find('td input[type="checkbox"]').hide();
// this does not hide anything, same as previous one
var grid_notification_queue = $("#grid_notification_queue");
$("#cb_" + grid_notification_queue.id).hide();
我这里缺少什么?如果使用fork,那么解决方案将非常简单。您只需添加
multiselectPosition: "none"
防止创建复选框的选项。它还提高了多重选择的性能。我提醒你,你可以找到不同的免费jqGrid选项,这与选择有关。multiselectPosition
的值可以是“left”
、“right”
或“none”
您可以使用此代码
$("input[type=checkbox]").each(function() {
$(this).hide();
});
试试这个:
$('#gbox_grid_notification_queue').find('input[type="checkbox"]').each(function(){
$(this).hide();
});
$(gbox网格通知队列输入[type=“checkbox”]).hide()代码>无效此代码将隐藏页面中的所有复选框,而不仅仅是网格中的复选框是。仅在选择器内添加id网格$(“#gbox_网格_通知_队列输入[类型=复选框]”)