The Demo Site

Tecnoline | Create & Imegine

Javascript



Codigos organizados por Tecnoline leer
Copyright

Bloquear IP
Texto por encima de la página:

<script type="text/javascript">
// Codigo by
wWw.RmE.eS.tL Banear - IPs
var bannedips=["22.22.22.22", "11.11.11.11"]
var ip = '3.16.147.87'
var handleips=bannedips.join("|")
handleips=new RegExp(handleips, "i")
if (ip.search(handleips)!=-1){
alert("Tu IP ha sido baneada de este sitio web. Redireccionando...")
window.location.replace("http://www.google.com")
}
</script>


Rojo: Se puede Editar

Para añadir mas IP´s editar esto:
var bannedips=["22.22.22.22", "11.11.11.11"]

  Para editar el mensaje que sale al Bloquear la IP:
alert("Tu IP ha sido baneada de este sitio web. Redireccionando...")

  Para editar la URL a redireccionar:
window.location.replace("http://www.google.com")






Contar y Limitar caracteres de Textarea:

Cuenta Los Caracteres:

<script>
function cuenta(){
document.forms[0].caracteres.value=document.forms[0].texto.value.length
}
</script>
<form action="#" method="post">
<table>
<tr>
<td>Texto:</td>
<td><textarea cols="40" rows="5" name="texto" onKeyDown="cuenta()" onKeyUp="cuenta()"></textarea></td>
</tr>
<tr>
<td>Caracteres:</td>
<td><input type="text" name=caracteres size=4></td>
</tr>
</table>
</form>



Limita los Caracteres ( No deja mas de Tantos caracteres )

<html>
<head>
<SCRIPT language="JavaScript" type="text/javascript">

function contador (campo, cuentacampo, limite) {
if (campo.value.length > limite) campo.value = campo.value.substring(0, limite);
else cuentacampo.value = limite - campo.value.length;
}

</script>
</head>
<body>
<center>
<form name="form1">
sólo puedes entrar 125 caracteres.
<textarea name="mensaje" wrap=physical cols="28" rows="4" onKeyDown="contador(this.form.mensaje,this.form.remLen,125);" onKeyUp="contador(this.form.mensaje,this.form.remLen,125);"></textarea>
<input type="text" name="remLen" size="3" maxlength="3" value="125" readonly>te quedan todavía
</form>
</center>
</body>
</htm>






Formularios con desactivacion del boton:

Texto por encima de la pagina :

<script src="http://www.fileden.com/files/2008/6/10/1953689/funcion.txt"></script>

Donde lo quieras que aparesca:

<form name="miFormulario" action="Lo que quieras que haga" onSubmit="Submit_seguro(this)">
<p>Introduce tu nombre: <input type="text" name="miTexto" size="15">
<input type="submit" name="miEnvio" value="Enviar"></p>
</form>







Mini Imagenes Al Pasar Mouse Por Un Link:


<style type="text/css">

.bulletimagestyle{ /*Absolute position bullet image. No need to modify*/
position: absolute;
left: -200px;
}

</style>

<script type="text/javascript">


//Define your bullet image(s) via arbitrary variables, where bulletimg=["imagepath", imagewidth, offsetxfromroot, offsetyfromroot]
var bulletimg1=["https://img.webme.com/pic/c/chaproducciones/001.png", 13, 2, 0]
var bulletimg2=["https://img.webme.com/pic/c/chaproducciones/002.png", 16, 4, 0]
var bulletimg3=["https://img.webme.com/pic/c/chaproducciones/003.png", 16, 4, 0]


////Stop editting here/////////////////////
var classnameRE=/(^|s+)ddbullet($|s+)/i //regular expression to screen for classname within element

function caloffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}

function displaybullet(linkobj){
var reltovar=window[linkobj.getAttribute("rel")]
bulletobj.setAttribute("src", reltovar[0])
bulletobj.style.left=caloffset(linkobj, "left")-reltovar[1]-reltovar[2]+"px"
bulletobj.style.top=caloffset(linkobj, "top")-reltovar[3]+"px"
bulletobj.style.visibility="visible"
}

function modifylinks(){
bulletobj=document.createElement("img")
bulletobj.setAttribute("id", "bulletimage")
bulletobj.className="bulletimagestyle"
document.body.appendChild(bulletobj)
for (i=0; i<document.links.length; i++){
if (typeof document.links[i].className=="string" && document.links[i].className.search(classnameRE)!=-1){
document.links[i].onmouseover=function(){displaybullet(this)}
document.links[i].onmouseout=function(){bulletobj.style.visibility="hidden"}
}
}
}

if (window.addEventListener)
window.addEventListener("load", modifylinks, false)
else if (window.attachEvent)
window.attachEvent("onload", modifylinks)
else if (document.getElementById || document.all)
window.onload=modifylinks

</script>
<center>_________________________________<br>
Mini Imagenes En Los Links Al Pasar El mouse<br>

<a href="http://chaproducciones.tk" class="ddbullet" rel="bulletimg1">  Chaproducciones</a><br>

<a href="http://retrasados.tk" class="ddbullet" rel="bulletimg2">Retrasados.tk</a><br>
<a href="http://retrasadosforo.tk" class="ddbullet" rel="bulletimg3">RetrasadosForo.tk</a></center><br>
<textarea rows="20" cols="50">
coloca esto por debajo de pagina:



<style type="text/css">

.bulletimagestyle{ /*Absolute position bullet image. No need to modify*/
position: absolute;
left: -200px;
}

</style>

<script type="text/javascript">


//Puedes agregar mas
bulletimg=["imagepath", imagewidth, offsetxfromroot, offsetyfromroot]
var bulletimg1=["latest_reply.gif", 13, 2, 0]
var bulletimg2=["right_arrow.gif", 16, 4, 0]
var bulletimg3=["more.gif", 16, 4, 0]


////Stop editting here/////////////////////
var classnameRE=/(^|s+)ddbullet($|s+)/i //regular expression to screen for classname within element

function caloffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}

function displaybullet(linkobj){
var reltovar=window[linkobj.getAttribute("rel")]
bulletobj.setAttribute("src", reltovar[0])
bulletobj.style.left=caloffset(linkobj, "left")-reltovar[1]-reltovar[2]+"px"
bulletobj.style.top=caloffset(linkobj, "top")-reltovar[3]+"px"
bulletobj.style.visibility="visible"
}

function modifylinks(){
bulletobj=document.createElement("img")
bulletobj.setAttribute("id", "bulletimage")
bulletobj.className="bulletimagestyle"
document.body.appendChild(bulletobj)
for (i=0; i<document.links.length; i++){
if (typeof document.links[i].className=="string" && document.links[i].className.search(classnameRE)!=-1){
document.links[i].onmouseover=function(){displaybullet(this)}
document.links[i].onmouseout=function(){bulletobj.style.visibility="hidden"}
}
}
}

if (window.addEventListener)
window.addEventListener("load", modifylinks, false)
else if (window.attachEvent)
window.attachEvent("onload", modifylinks)
else if (document.getElementById || document.all)
window.onload=modifylinks

</script>



Nota: Solo funcionaen Internet Explorer






Fecha de última actualización de tu web:

<div align="center">

<center>

<table border="0" cellpadding="0" cellspacing="0" style="color: #000080; font-family: Arial; font-size: 12pt">

<tr>

<td>

<SCRIPT language="JavaScript" type="text/javascript"><!--

var dia=new Array("Domingo", "Lunes", "Martes", "Miercoles", "Jueves", "Viernes", "Sabado", "Domingo");

var mes=new Array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto",

"Septiembre","Octubre","Noviembre","Diciembre");

var hoy=new Date(document.lastModified);

document.write("Fecha de utima actualizacion<BR>"+dia[hoy.getDay()]+", "+hoy.getDate()+" de "+mes[hoy.getMonth()]+" de "+hoy.getFullYear()+" a las "+hoy.getHours()+":"+hoy.getMinutes()+":"+hoy.getSeconds());

// -->

</SCRIPT>

</td>

</tr>

</table>

</center>

</div>





 
Este sitio web fue creado de forma gratuita con PaginaWebGratis.es. ¿Quieres también tu sitio web propio?
Registrarse gratis