后台TreeViw绑定了数据库表,
代码如下:
   public void ParentNode()    //创建父节点
        {
            string sqlselect = "select * from Sys_Colliery ";
            DataSet ds = dsDataBind(sqlselect);
            if (ds.Tables[0].Rows.Count != 0)
            {
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    TreeNode tn = new TreeNode();
                    tn.Text = ds.Tables[0].Rows[i]["CollName"].ToString();
                    tn.Value = ds.Tables[0].Rows[i]["CollCode"].ToString();
                    this.TreeView1.Nodes.Add(tn);
                 }
            }
在前台JS中怎样获得tn.Value的值
  function getValue() 
{
            value = document.getElementById("TreeView1").firstChild.nodeValue;
            alter(value)
}
我是这样做的,但还是获得不到Value值,高手们谁知道?