具有模仿文件资源管理器级别折叠的分层 html 列表框
我正在寻找一种技术,使 html 列表框适应具有无限数量级别的分层内容( const > 1 就足够了)。层次结构级别应该像通常的文件资源管理器视图一样可折叠。 html 列表框行为应尽可能全面地保留/模仿。您是否有关于在哪里可以找到或如何实现这一点的提示? jquery 解决方案很好。
firefox 3.5+,即8+,必须支持safari 5; Opera 11、Chrome 9 就不错了。
据我了解这个问题,列表框内容在它们自己的浏览器窗口中呈现,没有任何标准窗口装饰。关于如何在 js 中获取此窗口的句柄的提示将是一个足够的起点,并在我误解浏览器行为的情况下纠正我。
预先感谢您的努力,
最诚挚的问候,
卡斯滕
i'm looking for a technique to adapt a html listbox to hierarchical content with an unlimited number of levels ( const > 1 would be sufficient ). hierarchy levels should be collapsible as in the usual file explorer views. the html listbox behaviour should be preserved / mimicked as comprehensively as possible. do you have a hint on where to find or how to implement this ? jquery solutions are fine.
firefox 3.5+, ie 8+, safari 5 must be supported; opera 11, chrome 9 would be nice.
as far as i understand the issue, listbox contents are rendered inside their own browser window sporting none of the standard window adornments. a hint on how to obtain a handle on this window in js would be a sufficient starting point, as well as correcting me in case i misconceived the browser behaviour.
thanks in advance for your efforts,
best regards,
carsten
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我之前使用过 JStree ,发现它相对容易使用并且构建牢固。它有一些内置主题,您可以使用它们来模仿文件浏览器。
它使用多种数据源,包括支持 AJAX 动态更新。不过,如果您的树不太大,则 HTML 嵌套列表是可访问性的理想来源(没有 JS、屏幕阅读器、机器人都会有东西可看)。
您可以在每个节点中放置几乎任何您想要的内容,包括列表框或其他表单元素。
不过,我不太清楚你想要做什么(请参阅上面的评论)...
I've used JStree before and found it relatively easy to work with and solidly built. It has a few built-in themes you can use that mimic file explorers.
It uses a variety of data sources, including support for AJAX dynamic updates. If your tree isn't too large, though, an HTML nested list is an ideal source for accessibility (no JS, screen-readers, robots will all have something to look at).
You can put pretty much whatever you want in each node, including listboxes or other form elements.
I'm not very clear on what you're trying to do, though (see comment above)...
怎么样:
http://jquery.bassistance.de/treeview/demo/
How about:
http://jquery.bassistance.de/treeview/demo/