Está en la página 1de 22

La ventana tiembla al entrar en ella.

Ejemplo

Lo puedes ver en esta pgina al entrar.


Dale a F5 para actualizar la pgina y ver el efecto

Pgalo entre el ltimo <head> y <html> en vista HTML

<script language="JavaScript1.2">
function tremer(n) {
if (self.moveBy) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
self.moveBy(0,i);
self.moveBy(i,0);
self.moveBy(0,-i);
self.moveBy(-i,0);
}}}}
tremer(5)
</script>

Marquesina Doble Mensaje

El efecto crea una marquesina con doble texto con


efecto de parpadeo.

Ejemplo

<script language="JavaScript">
<!-- Oculto para browsers antiguos
// Este y otros JavaScripts
// en - http://www.gratisss.bizland.com

var scrtxt= "EL PRIMER MENSAJE VA AQUI"


var lentxt= scrtxt.length;
var width= 100;
var countb= 8; // Numero de veces que tintinea el flash del primer mensaje //
var count= width+lentxt;
var nmsg=1; // numero de mensajes
var message= new initArray(" TU SEGUNDO MENSAJE VA AQUI");
function initArray() {
this.length= initArray.arguments.length
for (var i= 0; i < this.length; i++)
this[i+1]= initArray.arguments[i]
}
function shift() {
var outtxt= ""
var dif= count-lentxt;
if (dif>0) {
for (var i= 1; i<=dif; i++) {
outtxt= outtxt+" "}
outtxt= outtxt+scrtxt.substring(0,width-dif)
}
else {
outtxt= scrtxt.substring(-dif,lentxt)
}
document.scrform.scrtext.value= outtxt
}
function scroll() {
var n;
if ((countb>0) && (count-lentxt==0)) {count=0}
if (count-->0) {
shift();
setTimeout("scroll()",65) // 65 tiempos de display entre letras //
}
else {
if (countb-->0) {
if ((countb % 2)==0) {
document.scrform.scrtext.value= " "
setTimeout("scroll()",250) //250 tiempos de Flash para el primer mensaje//
}
else {
document.scrform.scrtext.value= scrtxt;
if (countb==1) {
setTimeout("scroll()",2000)} //2000 tiempo de retardo para que aperezca mensaje
despues de flash//
else {
setTimeout("scroll()",250)} // retardo de flashing para que comienze el mensaje //
}
}
else {
now= new Date();
n= 1+Math.floor(nmsg*Math.abs(Math.sin(now.getTime())));
if (n>nmsg) { n= nmsg}
scrtxt= message[n];
lentxt= scrtxt.length;
count= lentxt+width+1;
setTimeout("scroll()",150) //150 tiempo de retardo para mostrar el segundo mensaje //
}
}
}
// -->
</script>
<center>
<form NAME="scrform" onSubmit="0">
<input TYPE="text" NAME="scrtext" SIZE="60">
</form>
<script> scroll();</script>

Frase recorre efecto mquina escribir.


Cerrar ventana

La frase recorre la barra de estado con el efecto de una


mquina de escribir.
<script LANGUAGE="JavaScript">
<!--
// Scrolling message settings
var MessageText = "Cdigos htm para web master, cientos de trucos y efectos
impresionantes"
var DisplayLength = 50
var pos = 1 - DisplayLength;
function ScrollInStatusBar(){
var scroll = "";
pos++;
if (pos == MessageText.length) pos = 1 - DisplayLength;
if (pos<0)
{
for (var i=1; i<=Math.abs(pos); i++)
scroll = scroll + "";
scroll = scroll + MessageText.substring(0, DisplayLength - i + 1);
}
else
scroll = scroll + MessageText.substring(pos, pos + DisplayLength);
window.status = scroll;
//Scrolling speed
setTimeout("ScrollInStatusBar()",100);
}
ScrollInStatusBar()
//-->
</script>
Abre nueva ventana con efecto de corredera en vertical y horizontal.
(Pgina configurable)

Ejemplo

Clic sobre la frase que contiene el vnculo. Puedes pegar este vnculo
tantas veces quieras y cambiarles la ruta desde "Propiedades de
Hipervnculo"..
<script LANGUAGE="JavaScript">
function janelanimada(endereco) {
var velocidadev = 15;
var topo = 0;
var esquerda = 0;
var velocidadeh = 15;
if (document.all) {
var tamlar = window.screen.availHeight - topo;
var tamjan = window.screen.availWidth - esquerda;
var tamanho = window.open("","","left=" + esquerda + ",top=" + topo +
",width=1,height=1,scrollbars=yes");
for (sizeheight = 1; sizeheight < tamlar; sizeheight += velocidadev) {
tamanho.resizeTo("1",sizeheight );}
for (sizewidth = 1; sizewidth < tamjan; sizewidth += velocidadeh) {
tamanho.resizeTo(sizewidth+6,sizeheight );}
tamanho.location = endereco;}
else
window.location = endereco;}
</script>
<p><a href="http://www.galeon.com/estilista"
onClick="janelanimada('http://www.yomaster.galeon.com');return
false;">Google,buscador</a><br>
Anular botn de la derecha
<!-- Botn derecho del mouse -->

<script LANGUAGE="JavaScript1.1">

<!-- Adaptado por Tk: Compatible con IE y NS -->

function derecha(e) {
if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2)){
alert('Botn derecho inhabilitado')
return false;
}

else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2)){


alert('Botn derecho inhabilitado')
}
}
document.onmousedown=derecha
</script>

Anular botn de la izquierda

><!-- Botn izquierdo del mouse -->

<script LANGUAGE="JavaScript1.1">

<!-- Adaptado por Tk: Compatible con IE y NS -->

function izquierda(e) {
if (navigator.appName == 'Netscape' && (e.which == 1 || e.which == 2)){
alert('Botn izquierdo inhabilitado')
return false;
}

else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 1)){


alert('Botn izquierdo inhabilitado')
}
}
document.onmousedown=izquierda
</script>
Anular botn de la derecha y la izquierda
<!-- Botn izquierdo y derecho del mouse -->

<script LANGUAGE="JavaScript1.1">

<!-- Adaptado por Tk: Compatible con IE y NS -->

function ambos(e) {
if (navigator.appName == 'Netscape' && (e.which == 1 || e.which == 3 || e.which == 2))
{
alert('Los botones del mouse han sido inhabilitados')
return false;
}

else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 1 ||


event.button == 2)){
alert('Los botones del mouse han sido inhabilitados')
}
}
document.onmousedown=ambos
</script>

Reloj digital colocado en la esquina superior

<!-- Colocar en la etiqueta <BODY> -->

<span id="liveclock" style="position:absolute;left:0;top:0;">


</span>

<script language="JavaScript">
<!--

function show5(){
if (!document.layers&&!document.all&&!document.getElementById)
return

var Digital=new Date()


var hours=Digital.getHours()
var minutes=Digital.getMinutes()
var seconds=Digital.getSeconds()

var dn="PM"
if (hours<12)
dn="AM"
if (hours>12)
hours=hours-12
if (hours==0)
hours=12

if (minutes<=9)
minutes="0"+minutes
if (seconds<=9)
seconds="0"+seconds
//change font size here to your desire
myclock="<font size='5' face='Arial' ><b><font size='1'>Hora
actual:</font></br>"+hours+":"+minutes+":"
+seconds+" "+dn+"</b></font>"
if (document.layers){
document.layers.liveclock.document.write(myclock)
document.layers.liveclock.document.close()
}
else if (document.all)
liveclock.innerHTML=myclock
else if (document.getElementById)
document.getElementById("liveclock").innerHTML=myclock
setTimeout("show5()",1000)
}

window.onload=show5
//-->
</script>

Cuenta progresiva de tiempo

<!-- Copiar este cdigo dentro del tag BODY -->

<script>

var montharray=new
Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")

function countup(yr,m,d){
var today=new Date()
var todayy=today.getYear()
if (todayy < 1000)
todayy+=1900
var todaym=today.getMonth()
var todayd=today.getDate()
var todaystring=montharray[todaym]+" "+todayd+", "+todayy
var paststring=montharray[m-1]+" "+d+", "+yr
var difference=(Math.round((Date.parse(todaystring)-Date.parse(paststring))/
(24*60*60*1000))*1)
difference+=" das"
document.write("Hace "+difference+" que LosRecursosGratis.com estan ayudando a los
webmasters!")
}
//webmaster esta es la fecha a cambiar
countup(2001,04,14)

</script>

Insertar fecha en una etiqueta configurable

<!-- Colocar dentro del tag BODY -->

<script languaje="JavaScript">

var mydate=new Date()


var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var dayarray=new
Array("Domingo","Lunes","Martes","Miercoles","Jueves","Viernes","Sabado")
var montharray=new
Array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembr
e","Octubre","Noviembre","Diciembre")
document.write("<small><font color='000000' face='Arial'>"+dayarray[day]+"
"+daym+" de "+montharray[month]+" de "+year+"</font></small>")

</script>
Cuenta atrs para cerrar una ventana
<!-- Colocar en la etiqueta <BODY> -->

onLoad="begintimer()"

<!-- Colocar dentro del tag BODY -->

<script>
<!--

//enter limit in "minutes:seconds" Minutes should range from 0 to inifinity. Seconds


should range from 0 to 59
var limit="1:30"
if (document.images){
var parselimit=limit.split(":")
parselimit=parselimit[0]*60+parselimit[1]*1
}
function begintimer(){
if (!document.images)
return
if (parselimit==1)
window.location="http://www.wsabstract.com"
else{
parselimit-=1
curmin=Math.floor(parselimit/60)
cursec=parselimit%60
if (curmin!=0)
curtime=curmin+" minutes and "+cursec+" seconds left"
else
curtime=cursec+" seconds left"
window.status=curtime
setTimeout("begintimer()",1000)
}
}
//-->
</script>

Men barra horizontal oculta desplazable

<!-- Colocar dentro de la etiqueta <HEAD> -->

<style>

#divMenu {font-family:arial,helvetica; font-size:12pt; font-weight:bold}


#divMenu a{text-decoration:none;}
#divMenu a:hover{color:red;}
</style>
<script language="JavaScript1.2">
/
**********************************************************************
**********
Submitted with modifications by Jack Routledge (http://fastway.to/compute) to
DynamicDrive.com
Adaptado por ..::LosRecursosGratis.com::.. (http://www.losrecursosgratis.com)
Copyright (C) 1999 Thomas Brattli @ www.bratta.com
This script is made by and copyrighted to Thomas Brattli
This may be used freely as long as this msg is intact!
This script has been featured on http://www.dynamicdrive.com
**********************************************************************
**********
Browsercheck:*/
ie=document.all?1:0
n=document.layers?1:0

//These are the variables you have to set:

//How much of the layer do you wan't to be visible when it's in the out state?
lshow=60

//How many pixels should it move every step?


var move=10;
//At what speed (in milliseconds, lower value is more speed)
menuSpeed=40

//Do you want it to move with the page if the user scroll the page?
var moveOnScroll=true

/
**********************************************************************
**********
You should't have to change anything below this.
**********************************************************************
**********/
//Defining variables
var tim;
var ltop;

//Object constructor
function makeMenu(obj,nest){
nest=(!nest) ? '':'document.'+nest+'.'
this.css=(n) ? eval(nest+'document.'+obj):eval(obj+'.style')

this.state=1
this.go=0
this.width=n?this.css.document.width:eval(obj+'.offsetWidth')
this.left=b_getleft
this.obj = obj + "Object"; eval(this.obj + "=this")
}
//Get's the top position.
function b_getleft(){
var gleft=(n) ? eval(this.css.left):eval(this.css.pixelLeft);
return gleft;
}
/
**********************************************************************
**********
Deciding what way to move the menu (this is called onmouseover, onmouseout or
onclick)
**********************************************************************
**********/
function moveMenu(){
if(!oMenu.state){
clearTimeout(tim)
mIn()
}else{
clearTimeout(tim)
mOut()
}
}
//Menu in
function mIn(){
if(oMenu.left()>-oMenu.width+lshow){
oMenu.go=1
oMenu.css.left=oMenu.left()-move
tim=setTimeout("mIn()",menuSpeed)
}else{
oMenu.go=0
oMenu.state=1
}
}
//Menu out
function mOut(){
if(oMenu.left()<0){
oMenu.go=1
oMenu.css.left=oMenu.left()+move
tim=setTimeout("mOut()",menuSpeed)
}else{
oMenu.go=0
oMenu.state=0
}
}
/
**********************************************************************
**********
Checking if the page is scrolled, if it is move the menu after
**********************************************************************
**********/
function checkScrolled(){
if(!oMenu.go) oMenu.css.top=eval(scrolled)+ltop
if(n) setTimeout('checkScrolled()',30)
}
/
**********************************************************************
**********
Inits the page, makes the menu object, moves it to the right place,
show it
**********************************************************************
**********/
function menuInit(){
oMenu=new makeMenu('divMenu')
scrolled=n?"window.pageYOffset":"document.body.scrollTop"
oMenu.css.left=-oMenu.width+lshow
ltop=(n)?oMenu.css.top:oMenu.css.pixelTop;
oMenu.css.visibility='visible'
if(moveOnScroll) ie?window.onscroll=checkScrolled:checkScrolled();
}

//Initing menu on pageload


onload=menuInit;
</script>
<!-- Colocar dentro de la etiqueta <BOBY> -->

<div id="divMenu" style="position:absolute; top:250; left:30; width:200;


visibility:hidden; background-color:F0F0F0">
<nobr>
<a href="http://www.losrecursosgratis.com">..::LosRecursosGratis.com::..</a> -
<a
href="http://www.losrecursosgratis.com/javascript/codigos_javascript.html">Trucos
JavaScript</a> -
<a href="javascript://" onclick="moveMenu()" style="background-
color:yellow;text-decoration:none">MENU</a>
</nobr>
</div>
Men barra horizontal con botones para desplazar
<!-- Colocar dentro de la etiqueta <HEAD> -->

<style>
body{
overflow-x:hidden;
overflow-y:scroll;
}
</style>

<!-- Colocar dentro de la etiqueta <BOBY> - cambia los enlaces y titulos por los de tu
web-->

<script language="JavaScript1.2">

/*
Scrollable Menu Links- By Dynamicdrive.com
For full source, TOS, and 100s DTHML scripts
Visit http://dynamicdrive.com

Traducido y adaptado por http://www.losrecursosgratis.com


*/

//configura aqui las imgenes


var goleftimage='imagenes/flechaizd.gif'
var gorightimage='imagenes/flechader.gif'
//configura la anchura del men
var menuwidth=300
//configura la velocidad del scroll (1-10), cuanto mayor, mas rpido
var scrollspeed=6
//specify menu content
var menucontents='<nobr><a
href="http://www.losrecursosgratis.com.com">LosRecursosGratis.com</a> | <a
href="http://www.lazonadejuegos.com">La Zona de Juegos</a> | <a
href="http://www.losrecursosgratis.com/directorio.htm">Directorio de recursos para
webamsters</a> | <a href="http://vendedoronline.com/promoweb/index.php?
ref=raroci">Aumenta las visitas a tu web</a></nobr>'

////NO EDITES NADA A PARTIR DE AQUI////////////

var actualwidth=''
var ns_scroll
function fillup(){
if (document.all){
test2.innerHTML=menucontents
actualwidth=test2.offsetWidth
}
else if (document.layers){
ns_scroll=document.ns_scrollmenu.document.ns_scrollmenu2
ns_scroll.document.write(menucontents)
ns_scroll.document.close()
actualwidth=ns_scroll.document.width
}
}
window.onload=fillup

function moveleft(){
if (document.all&&test2.style.pixelLeft>(menuwidth-actualwidth))
test2.style.pixelLeft-=scrollspeed
else if (document.layers&&ns_scroll.left>(menuwidth-actualwidth))
ns_scroll.left-=scrollspeed
lefttime=setTimeout("moveleft()",50)
}

function moveright(){
if (document.all&&test2.style.pixelLeft<0)
test2.style.pixelLeft+=scrollspeed
else if (document.layers&&ns_scroll.left<0)
ns_scroll.left+=scrollspeed
righttime=setTimeout("moveright()",50)
}

if (document.all||document.layers){
with (document){
write('<table border="0" cellspacing="0" cellpadding="0">')
write('<td valign="middle"><a href=#" onMouseover="moveleft()"
onMouseout="clearTimeout(lefttime)"><img src="'+goleftimage+'"border=0></a>
</td>')
write('<td valign="top">')
if (document.all){
write('<span style="position:relative;width:'+menuwidth+';">')
write('<span style="position:absolute;width:'+menuwidth+';clip:rect(0 '+menuwidth+'
auto 0)">')
write('<span id="test2" style="position:absolute;left:0;top:0">')
write('</span></span></span>')
}
else if (document.layers){
write('<ilayer width='+menuwidth+' name="ns_scrollmenu">')
write('<layer name="ns_scrollmenu2" left=0 top=0></layer></ilayer>')
}
write('</td>')
write('<td valign="middle"> <a href="#" onMouseover="moveright()"
onMouseout="clearTimeout(righttime)">')
write('<img src="'+gorightimage+'"border=0></a>')
write('</td></table>')
}
}
</script>
Precarga de imgenes
<!-- Dentro del tag HEAD -->

<script language="JavaScript1.2">
<!-- begin hiding

//
// Autor 2000 Marcin P Wojtowicz [one_spook@hotmail.com].
// Traducido, doblado y adaptado por http://www.losrecursosgratis.com
//

startingColor = new Array() // <-- Do not modify!


endingColor = new Array() // <-- Do not modify!

// Introduce aqui las imagenes que vas a cargar previamente:


var tusimagenes = new
Array("../../imagenes/topwebmaster.gif","../../Publicidad/imagenes/casino1.gif","../../Pub
licidad/ImagenesCXN/banner-consupermiso.gif") // Fill this array with the images you
wish to preload

var locationAfterPreload = "cargarimagenes.htm" // Aqui debes insertar la direccion de


la pgina de destino
var preloadbarWidth = 250 // Longitud que quieres que muestre la barra de carga
var preloadbarHeight = 15 // Anchura que quieres que muestre la barra
var backgroundOfGradient = "#000000" // Color que quieres que muestre la barra

startingColor[0] = "c"
startingColor[1] = "f"
startingColor[2] = "f"

endingColor[0] = "c"
endingColor[1] = "0"
endingColor[2] = "0"
var gap = 5

if (!document.all) location.replace(locationAfterPreload)
var a = 10, b = 11, c = 12, d = 13, e = 14, f=15, i, j, ones = new Array(), sixteens = new
Array(), diff = new Array();
var convert = new Array("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"),
imgLen = tusimagenes.length;
var loaded = new Array(), preImages = new Array(), currCount = 0, pending = 0, h = 0,
hilite = new Array(), cover = new Array();
var num = Math.floor(preloadbarWidth/gap);
for (i = 0; i < 3; i++) {
startingColor[i] = startingColor[i].toLowerCase();
endingColor[i] = endingColor[i].toLowerCase();
startingColor[i] = eval(startingColor[i]);
endingColor[i] = eval(endingColor[i]);
diff[i] = (endingColor[i]-startingColor[i])/num;
ones[i] = Math.floor(diff[i]);
sixteens[i] = Math.round((diff[i] - ones[i])*15);
}
endingColor[0] = 0;
endingColor[1] = 0;
endingColor[2] = 0;
i = 0, j = 0;
while (i <= num) {
hilite[i] = "#";
while (j < 3) {
hilite[i] += convert[startingColor[j]];
hilite[i] += convert[endingColor[j]];
startingColor[j] += ones[j];
endingColor[j] += sixteens[j];
if (endingColor[j] > 15) {
endingColor[j] -= 15;
startingColor[j]++;
}
j++;
}
j = 0;
i++;
}
function loadImages() {
for (i = 0; i < imgLen; i++) {
preImages[i] = new Image();
preImages[i].src = tusimagenes[i];
loaded[i] = 0;
cover[i] = Math.floor(num/imgLen)*(i+1)
}
cover[cover.length-1] += num%imgLen
checkLoad();
}
function checkLoad() {
if (pending) { changeto(); return }
if (currCount == imgLen) { location.replace(locationAfterPreload); return }
for (i = 0; i < imgLen; i++) {
if (!loaded[i] && preImages[i].complete) {
loaded[i] = 1; pending++; currCount++;
checkLoad();
return;
}
}
setTimeout("checkLoad()",10);
}
function changeto() {
if (h+1 > cover[currCount-1]) {
var percent = Math.round(100/imgLen)*currCount;
if (percent > 100) while (percent != 100) percent--;
if (currCount == imgLen && percent < 100) percent = 100;
defaultStatus = "Loaded " + currCount + " out of " + imgLen + " images
[" + percent + "%].";
pending--;
checkLoad();
return;
}
eval("document.all.cell" + (h+1) + ".style.backgroundColor = hilite[h]");;
h++;
setTimeout("changeto()",1);
}
defaultStatus = "Loaded 0 out of " + imgLen + " images [0%]."
// end hiding -->
</script>

<!-- Dentro del tag BODY -->

<center>
<font face="Verdana, Arial, Helvetica" size="2"><center>Cargando imagenes de la
pgina... Por Favor, espere..</center>
<script language="JavaScript1.2">
<!-- beging hiding
document.write('<table border="0" cellpadding="0" cellspacing="0" width="' +
preloadbarWidth + '"><tr height="' + preloadbarHeight + '" bgcolor="' +
backgroundOfGradient + '">');
for (i = 0; i < num; i++) {
document.write('<td width="' + gap + '" id="cell' + (i+1) + '"></td>');
}
document.write('</tr></table>');

// Aqui debes insertar la direccion de la pgina de destino


document.write('<p><small><a
href="javascript:location.replace(locationAfterPreload)">Saltar carga de imgenes
previa</a> &nbsp;| &nbsp;<a href="cargarimagenes.htm">Script
Credits</a></small></p></font>')
loadImages();
// end hiding -->
</script>
</center>
</font>
Cambia el color de la barra de desplazamiento
<!-- Copiar el cdigo dentro del tag HEAD -->

<style type="text/css">
BODY {
scrollbar-face-color: #CC3333;
scrollbar-shadow-color: #000000;
scrollbar-highlight-color: #000000;
scrollbar-3dlight-color: #999999;
scrollbar-darkshadow-color: #505050;
scrollbar-track-color: #cccccc;
scrollbar-arrow-color: #cccccc;
}
</style>
Oculta la direccin en la barra de estado
<!-- Copiar dentro del tag BODY -->
<!-- Codigo ofrecido por http://www.losrecursosgratis.com -->
<a href="http://la_direccion_que_quieras_que_aparezca"
onClick="javascript:window.location='http://La_Direccion_verdadera'
return false">Texto a indicar</a>
Buscadores mltiples (I)
<!-- Copiar este cdigo dentro del tag HEAD-->

<SCRIPT LANGUAGE="JavaScript">

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Adaptado por http://www.losrecursosgratis.com -->

<!-- Begin
Yahoo = "http://search.yahoo.com/bin/search?p=";
Alta = "http://www.altavista.digital.com/cgi-bin/query?pg=q&what=web&q=";
Open = "http://search.opentext.com/omw/simplesearch?SearchFor=";
Lycos = "http://www.lycos.com/cgi-bin/pursuit?query=";
Crawler = "http://www.webcrawler.com/cgi-bin/WebQuery?searchText=";
InfoSeek = "http://guide-p.infoseek.com/Titles?qt=";
DejaNews = "http://search.dejanews.com/nph-dnquery.xp?query=";
Inktomi = "http://204.161.74.8:1234/query/?query=";
MetaCrawler = "http://search.go2net.com/crawler?general=";
SavySearch = "http://guaraldi.cs.colostate.edu:2000/search?KW=";
Excite = "http://www.excite.com/search.gw?searchType=Concept&search=";
Magellan = "http://www.mckinley.com/searcher.cgi?query=";
Point = "http://point.lycos.com/cgi-bin/pursuit?query=";
Galaxy = "http://www.einet.net/cgi-bin/wais-text-multi?keywords=";
var got=0;
var url = "";
var plus="";
var mag="";
function search4(item){
stringPlus();
resultsWindow=window.open();
resultsWindow.document.open();
resultsWindow.document.write("<head><title>Close this window "
+ "to return to Search Page</title></head>"
+ "<FRAMESET ROWS=50%,50%><FRAMESET COLS=50%,50%>"
+ "<FRAME NAME='frame0' SRC='" + computeFrameSrc(0) + "'>"
+ "<FRAME NAME='frame1' SRC='" + computeFrameSrc(1) + "'>"
+ "</FRAMESET><FRAMESET COLS=50%,50%><FRAME NAME='frame2' "
+ "SRC='" + computeFrameSrc(2) + "'><FRAME NAME='frame3' "
+ "SRC='" + computeFrameSrc(3) + "'></FRAMESET></FRAMESET>");
resultsWindow.document.close();
got = 0;
}
function search2(item){
stringPlus();
resultsWindow=window.open();
resultsWindow.document.open();
resultsWindow.document.write("<head><title>Close this window "
+ "to return to Total search</title></head><FRAMESET ROWS=50%,50%>"
+ "<FRAME NAME='frame0' SRC='" + computeFrameSrc(0) + "'><FRAME "
+ "NAME='frame1' SRC='" + computeFrameSrc(1) + "'></FRAMESET>");
resultsWindow.document.close();
got = 0;
}
function stringPlus() {
for (var j=0; j < window.document.choose4.text.value.length; j++) {
if (window.document.choose4.text.value.charAt(j) == " ")
mag += "+";
else mag += window.document.choose4.text.value.charAt(j);}
}
function numChecked(item) {
plus = escape(item.text.value);
var h=0;
num=0;
for (var l=0; l < item.check1.length; l++) {
if (item.check1[l].checked) {
h++;
if (h++ <= 4){
if (l == "0"){
num = 1;}
else if (l == "1") num = 2;
else if (l == "2") num = 3;
else if (l == "3") num = 4;
else if (l == "4") num = 5;
else if (l == "5") num = 6;
else if (l == "6") num = 7;
else if (l == "7") num = 8;
else if (l == "8") num = 9;
else if (l == "9") num = 10;
else if (l == "10") num = 11;
else if (l == "11") num = 12;
else if (l == "12") num = 13;
}
}
}
if (h == 2)
Results(num-1);
else if (h == 4)
search2(item);
else
search4(item);
}
function computeFrameSrc(num) {
var k=-1;
for (var j=got; j < document.choose4.check1.length; j++) {
if (document.choose4.check1[j].checked){
k++;
if (k++ <= num){
if (j == "0"){
url = Yahoo + plus;
got = 1;}
else if (j == "1"){
url = Magellan + mag;
got = 2;}
else if (j == "2"){
url = Point + plus;
got = 3;}
else if (j == "3"){
url = Alta + plus + "&mode=and";
got = 4;}
else if (j == "4"){
url = Open + plus + "&mode=and";
got = 5;}
else if (j == "5"){
url = Lycos + plus + "&backlink=217&maxhits=25";
got = 6;}
else if (j == "6"){
url = Excite + plus +
"&category=default&mode=relevance&showqbe=1&display=html3,hb";
got = 7;}
else if (j == "7"){
url = Crawler + plus + "&maxHits=25";
got = 8;}
else if (j == "8"){
url = InfoSeek + plus + "&col=WW";
got = 9;}
else if (j == "9"){
url = DejaNews + plus + "&defaultOp=AND&svcclass=dncurrent&maxhits=25";
got = 10;}
else if (j == "10"){
url = Inktomi + plus + "&hits=25&disp=Text+Only";
got = 11;}
else if (j == "11"){
url = MetaCrawler + plus +
"&method=0&target=ion=0&rpp=20&timeout=5&hpe=10";
got = 12;}
else if (j == "12"){
url = SavySearch + plus +
"&classic=on&t1=x&Boolean=AND&Hits=10&Mode=MakePlan&df=normal&AutoSt
ep=on&AutoInt=on&lb=1";
got = 13;}
return url;
}
}
}
url = "javascript:void(0)";
return url;
}
function Results(place){
stringPlus();
resultsWin = open("","results");
if (place == "0")
url = Yahoo + plus;
else if (place == "1")
url = Magellan + mag;
else if (place == "2")
url = Point + plus;
else if (place == "3")
url = Alta + plus + "&mode=and";
else if (place == "4")
url = Open + plus + "&mode=and";
else if (place == "5")
url = Lycos + plus + "&backlink=217&maxhits=25";
else if (place == "6")
url = Excite + plus +
"&category=default&mode=relevance&showqbe=1&display=html3,hb";
else if (place == "7")
url = Crawler + plus + "&maxHits=25";
else if (place == "8")
url = InfoSeek + plus + "&col=WW";
else if (place == "9")
url = DejaNews + plus + "&defaultOp=AND&svcclass=dncurrent&maxhits=25";
else if (place == "10")
url = Inktomi + plus + "&hits=25&disp=Text+Only";
else if (place == "11")
url = MetaCrawler + plus +
"&logic=0ion=The+World&orgType=Any&maxwait=1&score=0";
else if (place == "12")
url = SavySearch + plus +
"&classic=on&t1=x&Boolean=AND&Hits=10&Mode=MakePlan&df=normal&AutoSt
ep=on&AutoInt=on&lb=1";
resultsWin.location = url;
}
// End -->
</script>

<!-- Copiar este cdigo dentro del tag BODY-->

<center><b>Encuntralo en los buscadores mas importantes</b>


<form name="choose4" action="javascript:numChecked(document.choose4) //"><p>
<table><tr><td><b>Directorios</b><br>
<input type="checkbox" name="check1" value="Yahoo"
onClick="choose4.check1.value='Yahoo'">Yahoo<br>
<input type="checkbox" name="check1" value="Magellan"
onClick="choose4.check1.value='Magellan'">Magellan<br>
<input type="checkbox" name="check1" value="Point"
onClick="choose4.check1.value='Point'">Point<br><br></td>
<td width="15"></td>
<td><b>Buscadores</b><br>
<input type="checkbox" name="check1" value="Alta"
onClick="choose4.check1.value='Alta'">Alta Vista<br>
<input type="checkbox" name="check1" value="Open"
onClick="choose4.check1.value='Open'">Open Text<br>
<input type="checkbox" name="check1" value="Lycos"
onClick="choose4.check1.value='Lycos'">Lycos<br>
<input type="checkbox" name="check1" value="Excite"
onClick="choose4.check1.value='Excite'">Excite<br></td>
<td><br><input type="checkbox" name="check1" value="Crawler"
onClick="choose4.check1.value='Crawler'">Webcrawler<br>
<input type="checkbox" name="check1" value="InfoSeek"
onClick="choose4.check1.value='InfoSeek'">InfoSeek<br>
<input type="checkbox" name="check1" value="DejaNews"
onClick="choose4.check1.value='DejaNews'">DejaNews<br>
<input type="checkbox" name="check1" value="Inktomi"
onClick="choose4.check1.value='Inktomi'">Inktomi<br> </td>
<td width="15"></td>
<td><b>Meta Buscadores</b><br>
<input type="checkbox" name="check1" value="MetaCrawler"
onClick="choose4.check1.value='MetaCrawler'">MetaCrawler<br>
<input type="checkbox" name="check1" value="SavySearch"
onClick="choose4.check1.value='SavySearch'">SavySearch<BR><br><br>
</td></tr></table><P><font size="3"><b>Introduce el texto para realizar la
bsqueda</b>:</font><BR>
<input type="text" name="text" size=30>
<input type="submit" name="send" value="Search">
</form>
</center>

<p style="margin-bottom: 0"><center>


<font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
by The JavaScript Source</font>
</center><p align="center" style="margin-top: 0; margin-bottom: 0"><font face="arial,
helvetica" size="-2">adaptado
por <a
href="http://www.losrecursosgratis.com">..::LosRecursosGratis.com::..</a></font><p>
Recomendar pgina
<!-- Copiar este cdigo dentro del tag BODY -->

<script language="javascript">
// Los mejores cdigos JavaScript en http://www.losrecursosgratis.com
function mailpage()
{
mail_str = "mailto:nombre@dominio.com?subject=visita esta pgina. Es muy buena!!
" + document.title;
mail_str += "&body=Hola amigo. Te recomiendo que visites esta pgina
LosRecursosGratis.com -- " + document.title;
mail_str += ". Enlace: " + location.href;
location.href = mail_str;
}
</script>
<a HREF="javascript:mailpage()">Recomendar por e-mail esta pgina</a>
_____________________________
Mira este cdigo...

<html>
<head>
</head>
<body id="pageWait">
<FORM>
<INPUT TYPE="BUTTON" VALUE="Activar espera" NAME="btnWait">
</FORM>
<SCRIPT LANGUAGE="VBScript">
Sub btnWait_OnClick
pageWait.style.cursor="wait"
End Sub
</SCRIPT>
</body>
</html>

El problema que hay es que internet explorer da preferencia a lo ms especfico que a


lo ms general... es decir... para todos los objetos que no tengan ninguna propiedad
cursor (tablas, textos, imgenes,...) el cursor se comportar tal como le hemos dicho
en el body, pero al pasar por enlaces y botones, que tienen por ser tales la propiedad
cursor definida (en enlaces la manita, en botones la flecha normal), el cursor cambia...

En cuanto al cdigo, es bastante sencillo... llama al objeto que quieras de una manera,
y despus le cambias la propiedad desde el script... igual que con el body, poda
haberse hecho con una tabla, un rea, un texto... casi lo que fuese.

Si es un problema para t lo que te dije antes de que al pasar por enlaces y botones el
cursor cambia... puedes intentar por ejemplo jugar con capas... es decir, poner una
capa trasparente (etiqueta <DIV>) por encima y cambiarle la propiedad cursor...
cuando quieras volver a como estabas, escondes la capa y ya est... tienes muchas
posibilidades para conseguirlo.

Suerte.

Ah! para ponerlo normal de nuevo... pageWait.style.cursor="default"

También podría gustarte