项目需求如下图,在服务端返回的json数据中,要经过射流研究…处理,添加复选框,并且复选框需响应射流研究…操作
在easyui的树形网格中,没有找到现成的插件,自己需要修改整理,代码如下复制代码代码如下: table class=' measuri-tree grid ' style=' width :700 px;高度:250 px ' URL=' control _ node _ JSON?group _ id=$ info[id]access _ node=$ _ REQUEST[access _ node]' ' id字段=' id ' treeField=' title ' fit=' true ' toolbar=' # control _ node _ toolbar _ { $ info[id]} '和tr th字段=' title ' width=' 200px ' data-options=' formatter : title _ formatter '名称/th字段='name' width='200px '节点/th字段="状态"宽度="50px "状态/th字段='备注'备注/th/tr ad/table div id=' control _ node _ toolbar _ { $ info[id]} ' a href=' JavaScript : alert(' test ');class=' measuri-link button ' iconCls=' icon-add ' plain=' true '控制/a /div上面是整个超文本标记语言代码,其中在easyui的好处是,JS调用的各种属性都可以直接写在桌子的属性里,直观易懂。接下来就把检验盒加进去。复制代码代码如下://对名称列数据进行格式华var access _ node=' { $ _ REQUEST[access _ node]} ' .split(',');函数title_formatter(值,节点){ var content=' input name=' set _ power ' id=' set _ power _ node。id“onclick=”set _ power _ status“(”节点。id ')' class=' set _ power _ status ' type=' checkbox ' value=' node。id ' '/'值;返回内容;}功能集_电源_状态(菜单_ id){ 0警报('要调用的函数和操作方法写这里');}其中用检验盒用$(set_power_1 ')这种方法是响应不了的,估计是因为easyui经过处理的原因。