-2
這裏開設一家分支jstree是html代碼:如何在JavaScript
<div id="jstree-beanDescCategorie" class="jstreeDiv" style="display: none;">
<div class="containerjsTree jstree jstree-2 jstree-default jstree-checkbox-selection" role="tree" aria-multiselectable="true" tabindex="0" aria-activedescendant="3" aria-busy="false">
<ul class="jstree-container-ul jstree-children jstree-wholerow-ul jstree-no-dots" role="group">
<li id="2" class="jstree-node jstree-closed" role="treeitem" aria-selected="false" aria-level="1" aria-labelledby="2_anchor" aria-expanded="false">
<div class="jstree-wholerow" unselectable="on" role="presentation"></div>
<i class="jstree-icon jstree-ocl" role="presentation"></i>
<a id="2_anchor" class="jstree-anchor" href="#" tabindex="-1"></a>
</li>
當分支是開放類變爲「jstree節點jstree開」
我使用Tchromium嵌入式德爾福 我試過:
var x = document.getElementsByClassName("jstree-node jstree-closed");
x[1].click();
什麼都沒有發生,但X不爲空
THKS您的回覆,我已經試過: 變種S:串; (「#jstree-beanDescCategoryie」)。jstree(true).open_node(「2」);'; javax.sourceforge.net(s); Javaexec(s); 結束; 但它不起作用 – bbd
$(「#jstree-beanDescCategorie」)。jstree(「open_node」,$(「#2」));不起作用 – bbd
我加載(沒有創建它)一個HTML文檔,我希望執行javascript命令以便在jstree中選擇選項。 – bbd