Texto en la barra de estado y tituloLas frases que hemos definido previamente en el JavaScript aparecen a la vez en la barra de estado y en la del título de la página.
Este es el script que puedes seleccionar, copiar y pegar directamente.
El script hay que pegarlo entre las etiquetas HEAD y /HEAD: <SCRIPT LANGUAGE='JavaScript'>
var default1 = "Consultorio Infrmatico"; // only shown once at page load
var text1 = "Visita nuestros servicios para webmasters";
var text2 = "Si utilizas este JavaScript";
var text3 = "Enlazanos en tu web, Gracias.";
var changeRate = 3000; // 1000 = 1 second
var messageNumber = 0;
function changeStatus() {
if (messageNumber == 0) {
window.status=default1;
document.title=default1;
}
else if (messageNumber == 1) {
window.status=text1;
document.title=text1;
}
else if (messageNumber == 2) {
window.status=text2;
document.title=text2;
}
else if (messageNumber == 3) {
window.status=text3;
document.title=text3;
messageNumber = 0;
}
messageNumber++;
setTimeout("changeStatus();",changeRate);
}
changeStatus(); // leave here to run right away
// -->
</SCRIPT>
Frases en diagonalAparece una frase en la parte izquierda superior de la página en diagonal que cambia de texto cada x segundos. Efecto muy logrado.
Este es el script que puedes seleccionar, copiar y pegar directamente.
Esta parte del script hay que pegarlo entre las etiquetas HEAD y /HEAD:<SCRIPT language=JavaScript>
<!-- Beginning of JavaScript -
// script trouvé sur
http://www.sitecrea.fr.st tout pour votre site
// le réalisateur :
// CREDITS:
// First diagonal textscroller worldwide by Urs Dudli and Peter Gehrig
// Copyright (c) 1999 Peter Gehrig and Urs Dudli. All rights reserved.
// Permission given to use the script provided that this notice remains as is.
// Additional scripts can be found at
http://www.24fun.ch.
//
info@24fun.ch// 1/4/2000
// IMPORTANT:
// If you add this script to a script-library or script-archive
// you have to add a link to
http://www.24fun.ch on the webpage
// where First diagonal textscroller worldwide will be running.
if (document.layers) {
alert("Explorer seulement")
}
//vous mettez ci-dessous tout les textes que vous voulez (en rajoutant un nombre aprés "message [")
var message = new Array()
message[0]="AQUI VA UNA FRASE"
message[1]="UN SEGUNDO TEXTO AQUI"
message[2]="PUEDES CONTINUAR"
message[3]="INSERTANDO MAS FRASES"
message[4]="SON ILIMITADAS"
message[5]="SI UTILIZAS ESTE SCRIPT"
message[6]="NO OLVIDES"
message[7]="PONER UN LINK"
message[8]="A CUARTA DINASTIA"
message[9]="EN TU WEB"
message[10]="TE LO AGRADECERIAMOS MUCHO"
message[11]="GRACIAS POR TU VISITA"
message[12]="VUELVE A VISITARNOS"
message[13]="MUCHAS GRACIAS"
var i_message=0
var scrollerheight=250
var scrollerwidth=400
var startheight=0
var font_size=25
var font_family="Times"
var timer
function initiate() {
document.all.rotationstyle.style.posLeft=-(Math.floor(scrollerwidth/2))+font_size
document.all.rotationstyle.style.posTop=startheight
startscroll()
}
function startscroll() {
if (document.all) {
do_rotate="yes"
rotationstyle.filters[0].apply()
rotationstyle.innerHTML=
'<OBJECT ID="rotationobj" CLASSID="CLSID:369303C2-D7AC-11d0-89D5-00A0C90833E6" STYLE="position:relative;width:'+scrollerwidth+'px;height:'+2*scrollerheight+'px">'+
'<PARAM NAME="Line0001" VALUE="SetLineStyle(0)">'+
'<PARAM NAME="Line0002" VALUE="SetLineColor(0,0,0)">'+
'<PARAM NAME="Line0003" VALUE="SetFillColor(0,0,0)">'+
'<PARAM NAME="Line0004" VALUE="SetFont(\''+font_family+'\', '+font_size+', 400, 0, 0, 0)">'+
'<PARAM NAME="Line0005" VALUE="Text(\''+message[i_message]+'\', 0, 0, 0)">'+
'</OBJECT>'
rotationstyle.filters[0].play()
rotationobj.Rotate(0,0,-45)
i_message++
if (i_message>=message.length) {i_message=0}
timer=setTimeout("startscroll()",4000)
}
}
function stopscroll() {
do_rotate="no"
}
// - End of JavaScript - -->
</SCRIPT>
Esta parte del script hay que pegarlo entre las etiquetas BODY y /BODY:<SPAN id=rotationstyle
style="FILTER: revealTrans(Transition=3, Duration=2); LEFT: -2000px; POSITION: absolute">
<OBJECT classid=CLSID:369303C2-D7AC-11d0-89D5-00A0C90833E6
id=rotationobj></OBJECT></SPAN>
Hay que añadir el siguiente evento onload dentro de la etiqueta BODY:onload=initiate()
Cambio de color al poner el cursorLos enlaces cambian de color y se remarcan con una doble línea cuando se pone el cursor sobre ellos.
Este es el script que puedes seleccionar, copiar y pegar directamente.
Esta parte del script hay que pegarlo entre las etiquetas HEAD y /HEAD:<script>
var coldColor = "#FF0000"
var hotColor = "#00FF00"
var motionPix = "7"
// do not edit below this line
// ======================================
var a='<style>'+
'A.InstantLink:link {'+
' color:'+coldColor+';'+
' text-decoration:none;'+
' padding:0 '+motionPix+' 0 0;'+
' }'+
'A.InstantLink:visited {'+
' color:'+coldColor+';'+
' text-decoration:none;'+
' padding:0 '+motionPix+' 0 0;}'+
'A.InstantLink:active {'+
' color:'+coldColor+';'+
' text-decoration:none;'+
' padding:0 '+motionPix+' 0 0;'+
' }'+
'A.InstantLink:hover {'+
' color:'+hotColor+';'+
' text-decoration:underline overline;'+
' padding:0 0 0 '+motionPix+';'+
' }'+
'</style>'
if (document.all || document.getElementById){
document.write(a)
}
</script>
Esta parte del script hay que pegarlo entre las etiquetas BODY y /BODY, donde se quiera que aparezca el efecto:<table border="0" cellpadding="1" cellspacing="0" bgcolor="#6E6650">
<tr>
<td>
<table border="0" cellpadding="7" cellspacing="0" bgcolor="#141414">
<tr>
<td bgcolor="#141414">
<font face="Arial" size="2" color="#FEDCBA">
<a class="InstantLink" href="
http://www.consultorioinformaticos.net">Link 1</a><br>
<img src="spacer.gif" width="5" height="5"><br>
<a class="InstantLink" href="
http://www.consultorioinformaticos.net">Link 2</a><br>
<img src="spacer.gif" width="5" height="5"><br>
<a class="InstantLink" href="
http://www.consultorioinformaticos.net">Link 3</a><br>
<img src="spacer.gif" width="5" height="5"><br>
<a class="InstantLink" href="
http://www.consultorioinformaticos.net">Link 4</a><br>
<img src="spacer.gif" width="5" height="5"><br>
<a class="InstantLink" href="
http://www.consultorioinformaticos.net">Link 5</a><br>
<img src="spacer.gif" width="5" height="5"><br>
<a class="InstantLink" href="
http://www.consultorioinformaticos.net">Link 6</a><br>
</font>
</td>
</tr>
</table>
</td>
</tr>
</table>
Links en cajaCuando pasamos el ratón sobre cada enlace, se abre una caja con los links correspondientes a cada categoría. Muy útil si tienes muchos enlaces.
Este es el script que puedes seleccionar, copiar y pegar directamente.
Esta parte del script hay que pegarlo entre las etiquetas HEAD y /HEAD:<style>
<!--
.menuskin{
position:absolute;
width:165px;
background-color:menu;
border:2px solid black;
font:normal 12px Verdana;
line-height:18px;
z-index:100;
visibility:hidden;
}
.menuskin a{
text-decoration:none;
color:black;
padding-left:10px;
padding-right:10px;
}
#mouseoverstyle{
background-color:highlight;
}
#mouseoverstyle a{
color:white;
}
-->
</style>
<script language="JavaScript1.2">
//Pop-it menu- By Dynamic Drive
//For full source code and more DHTML scripts, visit
http://www.consultorioinformaticos.net//This credit MUST stay intact for use
var linkset=new Array()
//SPECIFY MENU SETS AND THEIR LINKS. FOLLOW SYNTAX LAID OUT
linkset[0]='<div class="menuitems"><a href="
http://www.precios10.com">Ordenadores</a></div>'
linkset[0]+='<div class="menuitems"><a href="
http://www.cambiabanners.com">Intercambio de banners</a></div>'
linkset[0]+='<div class="menuitems"><a href="
http://www.iaupa.com">Recursos web</a></div>'
linkset[1]='<div class="menuitems"><a href="
http://msnbc.com">MSNBC</a></div>'
linkset[1]+='<div class="menuitems"><a href="
http://cnn.com">CNN</a></div>'
linkset[1]+='<div class="menuitems"><a href="
http://abcnews.com">ABC News</a></div>'
linkset[1]+='<div class="menuitems"><a href="
http://www.washingtonpost.com">Washington Post</a></div>'
////No need to edit beyond here
var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1
var ns6=document.getElementById&&!document.all
var ns4=document.layers
function showmenu(e,which){
if (!document.all&&!document.getElementById&&!document.layers)
return
clearhidemenu()
menuobj=ie4? document.all.popmenu : ns6? document.getElementById("popmenu") : ns4? document.popmenu : ""
menuobj.thestyle=(ie4||ns6)? menuobj.style : menuobj
if (ie4||ns6)
menuobj.innerHTML=which
else{
menuobj.document.write('<layer name=gui bgColor=#E6E6E6 width=165 onmouseover="clearhidemenu()" onmouseout="hidemenu()">'+which+'</layer>')
menuobj.document.close()
}
menuobj.contentwidth=(ie4||ns6)? menuobj.offsetWidth : menuobj.document.gui.document.width
menuobj.contentheight=(ie4||ns6)? menuobj.offsetHeight : menuobj.document.gui.document.height
eventX=ie4? event.clientX : ns6? e.clientX : e.x
eventY=ie4? event.clientY : ns6? e.clientY : e.y
//Find out how close the mouse is to the corner of the window
var rightedge=ie4? document.body.clientWidth-eventX : window.innerWidth-eventX
var bottomedge=ie4? document.body.clientHeight-eventY : window.innerHeight-eventY
//if the horizontal distance isn't enough to accomodate the width of the context menu
if (rightedge<menuobj.contentwidth)
//move the horizontal position of the menu to the left by it's width
menuobj.thestyle.left=ie4? document.body.scrollLeft+eventX-menuobj.contentwidth : ns6? window.pageXOffset+eventX-menuobj.contentwidth : eventX-menuobj.contentwidth
else
//position the horizontal position of the menu where the mouse was clicked
menuobj.thestyle.left=ie4? document.body.scrollLeft+eventX : ns6? window.pageXOffset+eventX : eventX
//same concept with the vertical position
if (bottomedge<menuobj.contentheight)
menuobj.thestyle.top=ie4? document.body.scrollTop+eventY-menuobj.contentheight : ns6? window.pageYOffset+eventY-menuobj.contentheight : eventY-menuobj.contentheight
else
menuobj.thestyle.top=ie4? document.body.scrollTop+event.clientY : ns6? window.pageYOffset+eventY : eventY
menuobj.thestyle.visibility="visible"
return false
}
function contains_ns6(a, b) {
//Determines if 1 element in contained in another- by Brainjar.com
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}
function hidemenu(){
if (window.menuobj)
menuobj.thestyle.visibility=(ie4||ns6)? "hidden" : "hide"
}
function dynamichide(e){
if (ie4&&!menuobj.contains(e.toElement))
hidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
hidemenu()
}
function delayhidemenu(){
if (ie4||ns6||ns4)
delayhide=setTimeout("hidemenu()",500)
}
function clearhidemenu(){
if (window.delayhide)
clearTimeout(delayhide)
}
function highlightmenu(e,state){
if (document.all)
source_el=event.srcElement
else if (document.getElementById)
source_el=e.target
if (source_el.className=="menuitems"){
source_el.id=(state=="on")? "mouseoverstyle" : ""
}
else{
while(source_el.id!="popmenu"){
source_el=document.getElementById? source_el.parentNode : source_el.parentElement
if (source_el.className=="menuitems"){
source_el.id=(state=="on")? "mouseoverstyle" : ""
}
}
}
}
if (ie4||ns6)
document.onclick=hidemenu
</script>
Esta parte del script hay que pegarlo entre las etiquetas BODY y /BODY, donde se quiera que aparezca el efecto:<div id="popmenu" class="menuskin" onMouseover="clearhidemenu();highlightmenu(event,'on')" onMouseout="highlightmenu(event,'off');dynamichide(event)">
</div>
<a href="#" onMouseover="showmenu(event,linkset[0])" onMouseout="delayhidemenu()">Enlaces 1</a><br>
<a href="#" onMouseover="showmenu(event,linkset[1])" onMouseout="delayhidemenu()">Enlaces 2</a>
Hay que añadir el siguiente evento onload dentro de la etiqueta BODY:onload=songticker()