jsp中带有checkbox的属性菜单需要用easyui组件来实现,代码如下:
Tree nodes with check boxes.
CascadeCheck
OnlyLeafCheck
function getChecked(){
var nodes = $('#tt').tree('getChecked');
var s = '';
for(var i=0; i if (s != '') s += ','; s += nodes[i].text; } alert(s); } 运行效果:
用JSP来拼写html很累的,而且不好调试,建议你用JS调用后台代码实现。JS现在都用框架JQUERY,推荐你一个控件
http://www.cnblogs.com/xuanye/archive/2009/10/26/1590250.html
这个是treeview上面有调用的方法
希望帮你解决这个问题
zTree很好用~