Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想创建一个包含用户输入选项的菜单。用户输入很可能存储在 JSON 对象中。
一种方法是 jstree。但是那里有什么好的选择吗?
这在很大程度上取决于您使用它做什么以及如何处理它,但是基本的 javascript 对象足以实现这一点。
menu = {} menu["apple"] = 1.99 menu["bagle"] = {price: 3.50, by:"KawaiUser99"} console.log(Object.keys(menu)) document.write(JSON.stringify(menu))