CÓDIGOS

No dejar seleccionar el texto de nuestra web, sirve mucho para los copiones: 
<script language="Javascript"><!-- Beginfunction disableselect(e){return false}function reEnable(){return true}document.onselectstart=new Function ("return false")if (window.sidebar){document.onmousedown=disableselectdocument.onclick=reEnable}// End --></script>
 
Este código te muestra cuantos estan en linea ahora en tu web mediante un pequeño widget:
<script type="text/javascript" src="http://widgets.amung.us/small.js"></script><script type="text/javascript">WAU_small('pgwnga9kklf2')</script>
 
Este código HTML le da un Saludo al visitante de buenos dias, noches, dependiendo en que hora este el visitante:
<Font size=2 face=arial><b><Script Language="JavaScript"><!-- today = new Date()if(today.getMinutes() < 10){ pad = "0"}else pad = "";document.write ;if((today.getHours() >=6) && (today.getHours() <=9)){document.write("¡Buen día!")}if((today.getHours() >=10) && (today.getHours() <=11)){document.write("¡Buen día!")}if((today.getHours() >=12) && (today.getHours() <=19)){document.write("¡Buenas tardes!")} if((today.getHours() >=20) && (today.getHours() <=23)){document.write("¡Buenas noches!")}if((today.getHours() >=0) && (today.getHours() <=3)){document.write("¡Buenas noches!")}if((today.getHours() >=4) && (today.getHours() <=5)){document.write("¡Buenas noches!")}// --></script></b></font>
 
Este código es para que tus visitanten agreguen tu web a sus favoritos facilmente, solo para IE y NS:
<!-- PRIMER PASO: Colocar dentro del tag HEAD -->
<script LANGUAGE="JavaScript">
function agregar(){
if ((navigator.appName=="Microsoft Internet Explorer") && (parseInt(navigator.appVersion)>=4)) {
var url="http://www.tu-sitio.comr/";
var titulo="Nombre del Sitio";
window.external.AddFavorite(url,titulo);
}
else {
if(navigator.appName == "Netscape") 
alert ("Presione Crtl+D para agregar este sitio en sus Bookmarks");
}
}
</script>
<!-- SEGUNDO PASO: Colocar dentro del tag BODY -->
<input type="button" value="Agregar a favoritos" onClick="javascript:agregar();">
 
Este código javascrip muestra la hora y fecha exata en tu página web facilmente:
<color=#000000><script language="JavaScript">  
//http://www.granhermano2011-envivo.blogspot.com/ 
function fecha(){ 
fecha = new Date() 
mes = fecha.getMonth() 
diaMes = fecha.getDate() 
diaSemana = fecha.getDay() 
anio = fecha.getFullYear() 
 
dias = new Array('Domingo','Lunes','Martes','Miercoles','Jueves','Viernes','Sabado') 
meses = new Array('Enero','Febrero','Marzo','Abril','Mayo','Junio','Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre')
document.write('<span id="fecha">') 
document.write (dias[diaSemana] + ", " + diaMes + " de " + meses[mes] + " de " + anio)
document.write ('</span>') 
</script> 
<style type="text/css">  
<!-- 
#fecha { 
    font-family: Tahoma, Verdana, Arial; 
    font-size: 12px; 
    color: #000000; 
        background :  
--> 
</style>  
<script language="JavaScript">  
function hora(){ 
var fecha = new Date() 
var hora = fecha.getHours() 
var minuto = fecha.getMinutes() 
var segundo = fecha.getSeconds() 
if (hora < 10) {hora = "0" + hora} 
if (minuto < 10) {minuto = "0" + minuto} 
if (segundo < 10) {segundo = "0" + segundo} 
var horita = hora + ":" + minuto + ":" + segundo 
document.getElementById('hora').firstChild.nodeValue = horita 
tiempo = setTimeout('hora()',1000) 
function inicio(){ 
document.write('<span id="hora">') 
document.write ('000000</span>') 
hora() 
</script> 
<style type="text/css">  
<!-- 
#hora { 
    width:100px; 
    font-family: Tahoma, Verdana, Arial; 
    font-size: 12px; 
    color: #000000; 
    background :  
    } 
--> 
</style>    
<div align="center">  
<b><script>fecha()</script></b></div> 
<div align="center"> 
<b><script>inicio()</script></b></div></color>
 
 
 
 

No hay comentarios:

Publicar un comentario