在checkbox上面添加onclick=function(){
var o = document.getElementById("yourID");
o.value(or innerText) = this.innerText;
}
var o = document.getElementById("yourID");
o.value(or innerText) = this.innerText;
}
调试欢乐多
{
TreeNode tn = e.Node;
if (tn.Checked)
{
this.richTextBox1.Text += tn.Name + "checked!" + "\r\n";
}
}
<asp:TreeView ID="FileDBTree" runat="server" ShowLines="true" CheckBoxes="True" ExpandDepth="1">
</asp:TreeView>
判断checkbox
for (int i = 0; i < node.ChildNodes.Count; i++)
{
if (node.ChildNodes[i].Checked)
{}
}