Js + DVML is cool, beautiful, and practical. Right-click the menu and choose menu> navigation menu.

Source: Internet
Author: User
Js + DVML is cool, beautiful, and practical. Right-click the pop-up menu.

<HTML xmlns: v> <HEAD> <pead> <meta http-equiv = "Content-Type" content = "text/html; charset = gb2312 "> <title> Js + DVML: a cool and practical shortcut menu </title> <STYLE> v \: * {behavior: url (# default # VML );}. menulist {position: static; PADDING-TOP: 6; LETTER-SPACING: 8; HEIGHT: 20; TEXT-ALIGN: center; margin-bottom: -2} </STYLE> </pead> <BODY oncontextmenu = 'Return false'> <Script> // Author: fengyunwu var menutime1 = null, showobjs1 = null // menutime1 = cyclic timer call Variable, showobjs1 = bind menu. function document is called when the timer is executed. onmouseup () {if (event. button = 2) menushow (menu2, 60, 10)} function menushow (showobjs, showwid, showsudu) {// right-click the menu to expand the function // function Description: menushow (menu id, average item width, stretch speed) if (menutime1! = Null) {clearInterval (menutime1); menutime1 = null} showobjs. style. left = event. x; showobjs. style. top = event. y; showobjs1 = showobjs. all. tags ("roundrect"); var showlens = showobjs1.length for (I = 0; I <showlens; I ++) {showobjs1 [I]. style. width = 0; showobjs1 [I]. style. visibility = "hidden"} showobjs. style. display = "" menutime1 = setInterval ("for (I = 0; I <" + showlens + "; I ++) {showobjs1 [I]. style. visibility = ''; if (showobjs1 [I]. offsetWid Th <"+ showwid +") {showobjs1 [I]. style. width = showobjs1 [I]. offsetWidth + "+ showsudu +"; break;} else {if (I = "+ (showlens-1) +") {clearInterval (menutime1); menutime1 = null }}}", 20)} function menuclose (showobjs2, showsudu2) {// right-click the menu to close the function // function Description: menushow (menu id, close compression speed) if (menutime1! = Null) return false showobjs1 = showobjs2.all. tags ("roundrect"); var showlens = showobjs1.length-1 menutime1 = setInterval ("for (I =" + showlens + "; I>-1; I --) {if (showobjs1 [I]. offsetWidth> 0) {try {showobjs1 [I]. style. width = showobjs1 [I]. offsetWidth-"+ showsudu2 +"; break;} catch (e) {showobjs1 [I]. style. visibility = 'den den '; if (I = 0) {clearInterval (menutime1); menutime1 = null }}}", 20)} script <v: roundrect class = menulist arcsize = 0.5 strokecolor = # 739EFE> <v: fill type = gradient opacity =. 4 color = # 739EFE color2 = white angle = "50"/> http://jscode.cn > Grid </v: roundrect> <v: roundrect class = menulist arcsize = 0.5 strokecolor = # 739EFE> <v: fill type = gradient opacity =. 4 color = # 739EFE color2 = white angle = "50"/> matrix </v: roundrect> <v: roundrect class = menulist arcsize = 0.5 strokecolor = # 739EFE> <v: fill type = gradient opacity =. 4 color = # 739EFE color2 = white angle = "50"/> demarcation line </v: roundrect> <v: roundrect class = menulist arcsize = 0.5 strokecolor = # 739EFE> <v: fill type = gradient opacity =. 4 color = # 739EFE color2 = white angle = "50"/> refresh </v: roundrect> <v: roundrect class = menulist arcsize = 0.5 strokecolor = # 739EFE> <v: fill type = gradient opacity =. 4 color = # 739EFE color2 = white angle = "50"/> Settings </v: roundrect> <v: roundrect class = menulist arcsize = 0.5 strokecolor = # 739EFE> <v: fill type = gradient opacity =. 4 color = # 739EFE color2 = white angle = "50"/> item </v: roundrect> <v: roundrect class = menulist arcsize = 0.5 strokecolor = # 739EFE> <v: fill type = gradient opacity =. 4 color = # 739EFE color2 = white angle = "50"/>. </v: roundrect> <v: roundrect class = menulist arcsize = 0.5 strokecolor = # 739EFE> <v: fill type = gradient opacity =. 4 color = # 739EFE color2 = white angle = "50"/> item .. </v: roundrect> <v: roundrect class = menulist arcsize = 0.5 strokecolor = # 739EFE> <v: fill type = gradient opacity =. 4 color = # 739EFE color2 = white angle = "50"/> item... </v: roundrect> <v: roundrect class = menulist arcsize = 0.5 strokecolor = # 739EFE onmouseup = "menuclose (menu2, 30)"> <v: fill type = gradient opacity =. 4 color = # 739EFE color2 = white angle = "50"/> cancel </v: roundrect> </body> </ptml>
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]

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.