struts2标签与dtree的js用在一起问题
d = new dTree('d',dtreeRoot);
d.add(0,-1,'系统权限');
d.add(1,0,"测试",'example01.html');
<s:iterator value="menusList" id="mu" status="status">
var menuId = <s:property value="menuId"/>;
var menuParenId = <s:property value="menuIdParent"/>;
var menuName = "<s:property value='menuName'/>";
alert("menuId "+menuId );
alert("menuParenId "+menuParenId );
alert("menuName "+menuName );
d.add(menuId,menuParenId,menuName,'example01.html');
//d.add(menuId,menuParenId,'aabb','example01.html');
</s:iterator>
其中前面三个值都能弹出来,就那个menuName出来的值如: 企业
请大侠指点下~!
------解决方案--------------------
整理下 更清楚些
JScript code
<script type="text/javascript">
d = new dTree('d');
<s:iterator value="list" var="list">
d.add(<s:property value="#list.deptId" />,<s:property value="#list.parentdeptId" />,
'<s:property value="#list.deptName" />',
'displaydeptinfoaction?deptId=<s:property value="#list.deptId" />','ListDepartment','main2');
</s:iterator>
document.write(d);
</script>