* 为TreeView加入OnClick事件
function OnTreeNodeChecked()
{
var element = window.event.srcElement;
if (!IsCheckBox(element))
return;
var isChecked = element.checked;
var tree = TV2_GetTreeById(<%=SubSysTree.ClientID%>);
var node = TV2_GetNode(tree,element);
TV2_SetChildNodesCheckStatus(node,isChecked);
var parent = TV2_GetParentNode(tree,node);
TV2_NodeOnChildNodeCheckedChanged(tree,parent,isChecked);
}
</.>
{
var element = window.event.srcElement;
if(element.tagName=="INPUT")
{
var id=element.id.toLowerCase().replace("checkbox","");
id+="Nodes";
var objDivId=document.getElementById(id);//element.getElementsByTagName("input");
var childrenTags= WebForm_GetElementsByTagName(objDivId,"input");
if(childrenTags!=null)
{
for(i=0;i<childrenTags.length;i++)
{
childrenTags[i].checked=element.checked;
}
}
}
}