1 个回答

https://www.w3school.com.cn/j...

document.querySelector('#footer').focus();
<div class="el-tree" role="tree">
    <div id="footer" class="el-tree-node is-focusable" role="treeitem" tabindex="-1" aria-expanded="false"
         aria-disabled="" aria-checked="false" draggable="false" data-key="86">
        <div class="el-tree-node__content" style="padding-left: 0px;"><span
                class="el-tree-node__expand-icon el-icon-caret-right"></span><span
                class="el-tree-node__label">一级 2</span></div>
    </div>
    <div class="el-tree__drop-indicator" style="display: none;"></div>
</div>
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题
宣传栏