FoldingMenu.html 1.3 KB

1234567891011121314151617181920212223242526272829
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>折叠菜单</title>
  6. <link rel="stylesheet" href="FoldingMenu.css">
  7. </head>
  8. <body>
  9. </body>
  10. </html>
  11. <script type="text/javascript" src="http://www.1473.cn/uform.js"></script>
  12. <script src="FoldingMenu.js"></script>
  13. <script type="text/javascript">
  14. var data = [
  15. { text: '菜单1', submenu: { text: ['子菜单1', '子菜单2', '子菜单3', '子菜单4', '子菜单5','子菜单6', '子菜单7', '子菜单8', '子菜单9', '子菜单10']} },
  16. { text: '菜单2', submenu: { text: ['子菜单1', '子菜单2', '子菜单3', '子菜单4', '子菜单5']} },
  17. { text: '菜单3', submenu: { text: ['子菜单1', '子菜单2', '子菜单3', '子菜单4', '子菜单5']} },
  18. { text: '菜单4', submenu: { text: ['子菜单1', '子菜单2', '子菜单3', '子菜单4', '子菜单5']} },
  19. { text: '菜单5', submenu: { text: ['子菜单1', '子菜单2', '子菜单3', '子菜单4', '子菜单5']} },
  20. { text: '菜单6', submenu: { text: ['子菜单1', '子菜单2', '子菜单3', '子菜单4', '子菜单5']} },
  21. { text: '菜单7', submenu: { text: ['子菜单1', '子菜单2', '子菜单3', '子菜单4', '子菜单5']} },
  22. { text: '菜单8', submenu: { text: ['子菜单1', '子菜单2', '子菜单3', '子菜单4', '子菜单5']} },
  23. ];
  24. U.Control.FoldMenu.CreateElement(data, document.body);
  25. </script>