Búsqueda en el Foro:
Buscar


« Ver tema anterior :: Ver siguiente tema »  
Autor Mensaje
Mensaje14-02-2009, 21:51 (UTC)    
Título del mensaje: [Codigo Javascript] Menu en la esquina

Espero que les guste!



Código:
 <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left"><script> if (!document.layers) document.write('<div id="divStayTopLeft" style="position:absolute">') </script> <layer id="divStayTopLeft"> <!--EDIT BELOW CODE TO YOUR OWN MENU--> <table border="1" width="130" cellspacing="0" cellpadding="0"> <tr> <td width="100%" bgcolor="#FFFFCC"> <p align="center"><b><font size="4">Menu</font></b></td> </tr> <tr> <td width="100%" bgcolor="#FFFFFF"> <p align="left"> <a href="http://www.dynamicdrive.com">Dynamic Drive</a><br>  <a href="http://www.dynamicdrive.com/new.htm">What's New</a><br>  <a href="http://www.dynamicdrive.com/hot.htm">What's Hot</a><br>  <a href="http://www.dynamicdrive.com/faqs.htm">FAQs</a><br>  <a href="http://www.dynamicdrive.com/morezone/">More Zone</a></td> </tr> </table> <!--END OF EDIT--> </layer> <script type="text/javascript"> /* Floating Menu script-  Roy Whittle (http://www.javascript-fx.com/) Script featured on/available at http://www.dynamicdrive.com/ This notice must stay intact for use */ //Enter "frombottom" or "fromtop" var verticalpos="frombottom" if (!document.layers) document.write('</div>') function JSFX_FloatTopDiv() { var startX = 3, startY = 150; var ns = (navigator.appName.indexOf("Netscape") != -1); var d = document; function ml(id) { var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id]; if(d.layers)el.style=el; el.sP=function(x,y){this.style.left=x;this.style.top=y;}; el.x = startX; if (verticalpos=="fromtop") el.y = startY; else{ el.y = ns ?</span> <script> if (! document.layers) document.write ( '<div id="divStayTopLeft" style="position:absolute">') </ script> <layer id="divStayTopLeft"> <! - EDIT ABAJO código a su propio menú -> <table border="1" width="130" cellspacing="0" cellpadding="0"> <tr> <td width="100%" bgcolor="#FFFFCC"> < p align = "center"> <font size="4"> <b> Menú </ font> </ b> </ td> </ tr> <tr> <td width = "100%" bgcolor = "# FFFFFF "> <p align="left"> href="http://www.dynamicdrive.com"> <a Dynamic Drive </ a> <br> <a href =" http://www.dynamicdrive.com / new.htm "> ¿Qué hay de nuevo </ a> <a <br> href="http://www.dynamicdrive.com/hot.htm"> Lo más </ a> <br> <a href =" http : / / www.dynamicdrive.com / faqs.htm "> Preguntas frecuentes </ a> <a <br> href="http://www.dynamicdrive.com/morezone/"> Más Zona </ a> </ td > </ tr> </ table> <! - FIN DE EDITAR -> </ capa> <script type="text/javascript"> / * Menú flotante script-Roy Whittle (http://www.javascript- fx.com /) de secuencias de comandos que figuran en / disponibles en http://www.dynamicdrive.com/ Este aviso debe permanecer intacta para su uso * / / / Intro "frombottom" o "fromtop" verticalpos var = "frombottom" if (! documento . capas) document.write ( '</ div>') JSFX_FloatTopDiv función () (var startx = 3, startY = 150; var ns = (navigator.appName.indexOf ( "Netscape")! = -1); var d = documento; función ml (id) (var el = d.getElementById? d.getElementById (id): d.all? d.all [id]: d.layers [id], si (d.layers) el.style = el; el.sP = function (x, y) = x (this.style.left; this.style.top = y;); el.x = startx, si (verticalpos == "fromtop") el.y = startY; else (el.y = ns?</span> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left">pageYOffset + innerHeight : document.body.scrollTop + document.body.clientHeight; el.y -= startY; } return el; } window.stayTopLeft=function() { if (verticalpos=="fromtop"){ var pY = ns ?</span> pageYOffset + innerHeight: document.body.scrollTop + document.body.clientHeight; el.y -= startY;) el retorno;) window.stayTopLeft = function () (if (verticalpos == "fromtop") (var ns = PY ?</span> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left">pageYOffset : document.body.scrollTop; ftlObj.y += (pY + startY - ftlObj.y)/8; } else{ var pY = ns ?</span> pageYOffset: document.body.scrollTop; ftlObj.y + = (PY + startY - ftlObj.y) / 8;) else (var py = ns?</span> <span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left">pageYOffset + innerHeight : document.body.scrollTop + document.body.clientHeight; ftlObj.y += (pY - startY - ftlObj.y)/8; } ftlObj.sP(ftlObj.x, ftlObj.y); setTimeout("stayTopLeft()", 10); } ftlObj = ml("divStayTopLeft"); stayTopLeft(); } JSFX_FloatTopDiv(); </script></span> pageYOffset + innerHeight: document.body.scrollTop + document.body.clientHeight; ftlObj.y + = (PY - startY - ftlObj.y) / 8;) ftlObj.sP (ftlObj.x, ftlObj.y); setTimeout ( " stayTopLeft () ", 10);) ftlObj = ml (" divStayTopLeft "); stayTopLeft ();) JSFX_FloatTopDiv (); </ script></span>


Fuente: www.dynamicdrive.com


Modificar el código HTML dentro de la secuencia de comandos (como se indica en los comentarios) a la suya.
______________


Ultima edición por ivanswebs el Mar Feb 24, 2009 7:29 pm; editado 2 veces
Mostrar mensajes anteriores:   


Powered by phpBB © 2001, 2005 phpBB Group