Vida Una Homepage
Forum Home Forum Home > Programación > Códigos JavaScript
  New Posts New Posts RSS Feed - Menu boton derecho
  FAQ FAQ  Forum Search   Events   Register Register  Login Login


Menu boton derecho

 Post Reply Post Reply
Author
Message
Programador View Drop Down
Expert@
Expert@
Avatar

Joined: 09 Mayo 2009
Location: San Pedro Alc.
Status: Offline
Points: 54
Post Options Post Options   Thanks (0) Thanks(0)   Quote Programador Quote  Post ReplyReply Direct Link To This Post Topic: Menu boton derecho
    Posted: 25 Enero 2011 at 8:46am
Menu al pulsar con tu boton derecho del raton
 
 
En el <head>
 
<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">
<!-- Web Site:  http://www.dynamicdrive.com -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
var menuskin = "skin1"; // skin0, or skin1
var display_url = 0; // Show URLs in status bar?
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;
else
ie5menu.style.left = document.body.scrollLeft + event.clientX;
if (bottomedge < ie5menu.offsetHeight)
ie5menu.style.top = document.body.scrollTop + event.clientY - ie5menu.offsetHeight;
else
ie5menu.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"));
else
window.location = event.srcElement.url;
  }
}
//  End -->
</script>
 
 
En el <body>
 
<div id="ie5menu" class="skin0" onMouseover="highlightie5()" onMouseout="lowlightie5()" onClick="jumptoie5();">
<div class="menuitems" url="Vida'>http://www.vidauna.com">Vida Una</div>
<div class="menuitems" url="Otra'>http://www.vidauna.com">Otra vez a creatupropiaweb</div>
<hr>
<div class="menuitems" url="y'>http://www.vidauna.com">y otra a creatupropiaweb</div>
<div class="menuitems" url="pues'>http://www.vidauna.com">pues otra vez</div>
<hr>
<div class="menuitems" url="te'>http://www.vidauna.com">te lo imaginas</div>
<div class="menuitems" url="Para'>http://www.vidauna.com">Para que cambiar</div>
</div>
<script language="JavaScript1.2">
if (document.all && window.print) {
ie5menu.className = menuskin;
document.oncontextmenu = showmenuie5;
document.body.onclick = hidemenuie5;
}
</script>
Back to Top
Sponsored Links


Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.053 seconds.