Simulate the office menu

Source: Internet
Author: User
Tags border color
<Style type = "text/css">
* {Font-size: 12px ;}
Body {margin: 0px ;}
</Style>
<Script language = "JavaScript">
// Office XP menu
Var sub_display = false;
// Color array Description: This array stores the color styles of each part of the menu. You can change the color value to achieve the effect of changing the style.
// Values are as follows: highlighted background color, highlighted border color, menu bar background color, sub menu background color, sub menu border color, sub menu Title color, sub menu shadow color
Var color = ['# B6BDD2', '# 0A246A', '# D4D0C8', '# f8f8f8',' #666666 ',' # DBD8D1 ',' # ddddddddddd'];
// Menu array Description: This array stores menu data
// The values are as follows:
// 1. Name of the main menu. The white space length is extended from the drop-down menu to the right.
// 1st sub-menu name, link address
// 2nd sub-menu name, link address
// 4 .......
Var menu = new Array ();
Menu [0] = [['menu 1', 50], ['000000', '1.htm'], ['000000', '2.htm'], ['000000 ', '3.htm'];
Menu [1] = [['menu 2', 50], ['000000', '1.htm'], ['000000', '2.htm'], ['000000 ', '3.htm'];
Menu [2] = [['menu 3', 50], ['000000', '1.htm'], ['000000', '2.htm'], ['000000 ', '3.htm'];
Menu [3] = ['menu 4', 50], ['000000', '1.htm'], ['000000', '2.htm'], ['000000 ', '3.htm'];
Menu [4] = ['menu 5', 50], ['000000', '1.htm'], ['000000', '2.htm'], ['000000 ', '3.htm'];
Menu [5] = [['menu 6', 50], ['000000', '1.htm'], ['000000', '2.htm'], ['000000 ', '3.htm'];
Document. write ('<table width = "100%" cellspacing = "0" cellpadding = "0" style = "background-color:' + color [2] + '; border-left: 1px # F4F4F4 solid; border-top: 1px # F4F4F4 solid; border-right: 1px #999999 solid; border-bottom: 1px #999999 solid; "onSelectStart =" return false; "onContextMenu =" return false; "> <tr> <td width =" 5 "> </td> <table cellspacing =" 0" cellpadding = "2"> <tr> ');
For (var I = 0; I <menu. length; I ++)
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.