Right-click the menu

Source: Internet
Author: User
Tags visibility
Tip: you can modify some code before running

<html><head><title>Right-click the menu</title></head><body><!--将以下代码加入HTML的<Body></body>之间--><style><!--.skin0 {position:absolute;text-align:left;width:200px;border:2px solid black;background-color:menu;font-family:Verdana;line-height:20px;cursor:default;visibility:hidden;}.skin1 {cursor:default;position:absolute;text-align:left;font-family: Arial, Helvetica, sans-serif;font-size: 10pt;width:120px;background-color:menu;visibility:hidden;border:2px outset buttonhighlight;; font-style:normal; font-variant:normal; font-weight:normal}.menuitems {padding-left:15px;padding-right:10px;}--></style><SCRIPT LANGUAGE="JavaScript1.2"><!-- Beginvar menuskin = "skin1"; var display_url = 0; function showmenuie5() {var rightedge = document.body.clientWidth-event.clientX;var bottomedge = document.body.clientHeight-event.clientY;if (rightedge < ie5menu.offsetWidth)ie5menu.style.left = document.body.scrollLeft + event.clientX - ie5menu.offsetWidth;elseie5menu.style.left = document.body.scrollLeft + event.clientX;if (bottomedge < ie5menu.offsetHeight)ie5menu.style.top = document.body.scrollTop + event.clientY - ie5menu.offsetHeight;elseie5menu.style.top = document.body.scrollTop + event.clientY;ie5menu.style.visibility = "visible";return false;}function hidemenuie5() {ie5menu.style.visibility = "hidden";}function highlightie5() {if (event.srcElement.className == "menuitems") {event.srcElement.style.backgroundColor = "highlight";event.srcElement.style.color = "white";if (display_url)window.status = event.srcElement.url; }}function lowlightie5() {if (event.srcElement.className == "menuitems") {event.srcElement.style.backgroundColor = "";event.srcElement.style.color = "black";window.status = ""; }}function jumptoie5() {if (event.srcElement.className == "menuitems") {if (event.srcElement.getAttribute("target") != null)window.open(event.srcElement.url, event.srcElement.getAttribute("target"));elsewindow.location = event.srcElement.url; }}// End --></script><div id="ie5menu" class="skin0" onMouseover="highlightie5()" onMouseout="lowlightie5()" onClick="jumptoie5();"><div class="menuitems" url="#">Webpage special effects</div><div class="menuitems" url="#">Tutorial</div><div class="menuitems" url="#">Webpage Template</div><div class="menuitems" url="#">Source code download</div></div><script language="JavaScript1.2">If (document. all & window. print) {ie5menu. className = menuskin; document. oncontextmenu = showmenuie5; document. body. onclick = hidemenuie5 ;}</script></body></html>
Tip: you can modify some code before running

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.