请问一下,jsTree checkbox 如何获取所选中的checkbox的值?

请问一下,jsTree checkbox 如何获取所选中的checkbox的值?
2025年04月29日 21:54
有2个网友回答
网友(1):

function getMenuIds(){

//取得所有选中的节点,返回节点对象的集合
var ids="";
var nodes=$("#JsTree").jstree("get_checked"); //使用get_checked方法
$.each(nodes, function(i, n) {
ids += $(n).attr("id")+",";
});
alert(ids);

}

网友(2):

jquery吧。
或js遍历表单