如何用js获取TreeView节点的value值?
注意是value值

解决方案 »

  1.   

    document.getElementById("id名").value
      

  2.   

    或者 document.getElementByName("标签名字").value
      

  3.   

    表单 还是直接是body里面的?
      

  4.   

    document.getElementById("id名").innerHTML
      

  5.   

    啥意思? 你直接说你要哪个标签的value?
      

  6.   


    <div id="TreeViewDatan4Nodes" style="display:none;">
    <table cellpadding="0" cellspacing="0" style="border-width:0;">
    <tr>
    <td><div style="width:20px;height:1px"></div></td><td><div style="width:20px;height:1px"></div></td><td><img src="/ceshi.Web/WebResource.axd?d=khmF9eHgZ6fdWxKlMvtITavnXo953XRuCY5LF6R8GEBH7pJEgFY4U_2r14yWVk1iRp5a4V772fUctfRGjdY-KzgBvo0AnF9AjuwZ2kZhl91wHh450&amp;t=634214323940000000" alt="" /></td><td style="white-space:nowrap;"><input type="checkbox" name="TreeViewDatan5CheckBox" id="TreeViewDatan5CheckBox" /><a class="TreeViewData_0" href="javascript:void(0)" id="TreeViewDatat5">五家渠市</a></td> </tr>
    </table><table cellpadding="0" cellspacing="0" style="border-width:0;">
    <tr>
    <td><div style="width:20px;height:1px"></div></td><td><div style="width:20px;height:1px"></div></td><td><img src="/ceshi.Web/WebResource.axd?d=khmF9eHgZ6fdWxKlMvtITavnXo953XRuCY5LF6R8GEBH7pJEgFY4U_2r14yWVk1iRp5a4V772fUctfRGjdY-KzgBvo0AnF9AjuwZ2kZhl91wHh450&amp;t=634214323940000000" alt="" /></td><td style="white-space:nowrap;"><input type="checkbox" name="TreeViewDatan6CheckBox" id="TreeViewDatan6CheckBox" /><a class="TreeViewData_0" href="javascript:void(0)" id="TreeViewDatat6">图木舒克市</a></td>
    </tr>
    </table><table cellpadding="0" cellspacing="0" style="border-width:0;">
    <tr>
    <td><div style="width:20px;height:1px"></div></td><td><div style="width:20px;height:1px"></div></td><td><img src="/ceshi.Web/WebResource.axd?d=khmF9eHgZ6fdWxKlMvtITavnXo953XRuCY5LF6R8GEBH7pJEgFY4U_2r14yWVk1iRp5a4V772fUctfRGjdY-KzgBvo0AnF9AjuwZ2kZhl91wHh450&amp;t=634214323940000000" alt="" /></td><td style="white-space:nowrap;"><input type="checkbox" name="TreeViewDatan7CheckBox" id="TreeViewDatan7CheckBox" /><a class="TreeViewData_0" href="javascript:void(0)" id="TreeViewDatat7">阿拉尔市</a></td> </tr>
    </table><table cellpadding="0" cellspacing="0" style="border-width:0;">
    <tr>
    <td><div style="width:20px;height:1px"></div></td><td><div style="width:20px;height:1px"></div></td><td><img src="/ceshi.Web/WebResource.axd?d=khmF9eHgZ6fdWxKlMvtITavnXo953XRuCY5LF6R8GEBH7pJEgFY4U_2r14yWVk1iRp5a4V772fUctfRGjdY-KzgBvo0AnF9AjuwZ2kZhl91wHh450&amp;t=634214323940000000" alt="" /></td><td style="white-space:nowrap;"><input type="checkbox" name="TreeViewDatan8CheckBox" id="TreeViewDatan8CheckBox" /><a class="TreeViewData_0" href="javascript:void(0)" id="TreeViewDatat8">石河子市</a></td>
    </tr>
    </table>
    </div>
      

  7.   

    document.getElementById("TreeViewDatan4Nodes").innerHTML
      

  8.   

    从html上看,什么值也没有,你要取得什么值?超链接的字符串?
      

  9.   

    就是html上找不到那个value值了啊