Esto se usa mucho en formularios, donde llenas y abajo hay un contador que indica cuántos carácteres has escrito en la textarea.
Ejemplo
Modifiquen:
+ TEXTO: - Pueden editar este texto poniendo lo que ustedes quieran. Es la palabra que saldrá antes de la textárea.
[+] Coloca el código donde quieras que aparezca la textárea / formulario / cuadro para escribir.
Ejemplo
Modifiquen:
+ TEXTO: - Pueden editar este texto poniendo lo que ustedes quieran. Es la palabra que saldrá antes de la textárea.
[+] Coloca el código donde quieras que aparezca la textárea / formulario / cuadro para escribir.
<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>
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>
Este es un código ofrecido por warioteayuda, el cual permite pasear una imagen por toda la página, clickeando sobre la imagen y arrastrando el mouse.
Modifiquen:
+ position:absolute;left:120px;top:500px; - Con esto indicas la posición inicial de la imagen (Esto puede dar una ayuda para editar el código)
+ URL DE TU IMAGEN - Aquí debes colocar la url de la imagen la cual se la podrá mover por toda la página
¿URL de imágenes? Tutoriales:
Link1, Link2, Link3, Link4, Link5, Link6, Link7, Link8, Link9
[+] Si quieres aplicar este efecto en todas las páginas de tu web, puedes colocar el código en cualquier caja de Editar diseño.
[+] Si quieres aplicar este efecto en una sola sección / apartado / página de tu web, debes ir a Controlar páginas, das clic en la página / sección de tu web donde quieras aplicar el efecto, presionas Fuente HTML y pegas el código arriba o abajo de todo lo que tienes.
Modifiquen:
+ position:absolute;left:120px;top:500px; - Con esto indicas la posición inicial de la imagen (Esto puede dar una ayuda para editar el código)
+ URL DE TU IMAGEN - Aquí debes colocar la url de la imagen la cual se la podrá mover por toda la página
¿URL de imágenes? Tutoriales:
Link1, Link2, Link3, Link4, Link5, Link6, Link7, Link8, Link9
[+] Si quieres aplicar este efecto en todas las páginas de tu web, puedes colocar el código en cualquier caja de Editar diseño.
[+] Si quieres aplicar este efecto en una sola sección / apartado / página de tu web, debes ir a Controlar páginas, das clic en la página / sección de tu web donde quieras aplicar el efecto, presionas Fuente HTML y pegas el código arriba o abajo de todo lo que tienes.
<script type="text/javascript">
var Drag = {
obj : null,
init : function(o, oRoot, minX, maxX, minY, maxY, bSwapHorzRef, bSwapVertRef, fXMapper, fYMapper)
{
o.onmousedown = Drag.start;
o.hmode = bSwapHorzRef ? false : true ;
o.vmode = bSwapVertRef ? false : true ;
o.root = oRoot && oRoot != null ? oRoot : o ;
if (o.hmode && isNaN(parseInt(o.root.style.left ))) o.root.style.left = "0px";
if (o.vmode && isNaN(parseInt(o.root.style.top ))) o.root.style.top = "0px";
if (!o.hmode && isNaN(parseInt(o.root.style.right ))) o.root.style.right = "0px";
if (!o.vmode && isNaN(parseInt(o.root.style.bottom))) o.root.style.bottom = "0px";
o.minX = typeof minX != 'undefined' ? minX : null;
o.minY = typeof minY != 'undefined' ? minY : null;
o.maxX = typeof maxX != 'undefined' ? maxX : null;
o.maxY = typeof maxY != 'undefined' ? maxY : null;
o.xMapper = fXMapper ? fXMapper : null;
o.yMapper = fYMapper ? fYMapper : null;
o.root.onDragStart = new Function();
o.root.onDragEnd = new Function();
o.root.onDrag = new Function();
},
start : function(e)
{
var o = Drag.obj = this;
e = Drag.fixE(e);
var y = parseInt(o.vmode ? o.root.style.top : o.root.style.bottom);
var x = parseInt(o.hmode ? o.root.style.left : o.root.style.right );
o.root.onDragStart(x, y);
o.lastMouseX = e.clientX;
o.lastMouseY = e.clientY;
if (o.hmode) {
if (o.minX != null) o.minMouseX = e.clientX - x + o.minX;
if (o.maxX != null) o.maxMouseX = o.minMouseX + o.maxX - o.minX;
} else {
if (o.minX != null) o.maxMouseX = -o.minX + e.clientX + x;
if (o.maxX != null) o.minMouseX = -o.maxX + e.clientX + x;
}
if (o.vmode) {
if (o.minY != null) o.minMouseY = e.clientY - y + o.minY;
if (o.maxY != null) o.maxMouseY = o.minMouseY + o.maxY - o.minY;
} else {
if (o.minY != null) o.maxMouseY = -o.minY + e.clientY + y;
if (o.maxY != null) o.minMouseY = -o.maxY + e.clientY + y;
}
document.onmousemove = Drag.drag;
document.onmouseup = Drag.end;
return false;
},
drag : function(e)
{
e = Drag.fixE(e);
var o = Drag.obj;
var ey = e.clientY;
var ex = e.clientX;
var y = parseInt(o.vmode ? o.root.style.top : o.root.style.bottom);
var x = parseInt(o.hmode ? o.root.style.left : o.root.style.right );
var nx, ny;
if (o.minX != null) ex = o.hmode ? Math.max(ex, o.minMouseX) : Math.min(ex, o.maxMouseX);
if (o.maxX != null) ex = o.hmode ? Math.min(ex, o.maxMouseX) : Math.max(ex, o.minMouseX);
if (o.minY != null) ey = o.vmode ? Math.max(ey, o.minMouseY) : Math.min(ey, o.maxMouseY);
if (o.maxY != null) ey = o.vmode ? Math.min(ey, o.maxMouseY) : Math.max(ey, o.minMouseY);
nx = x + ((ex - o.lastMouseX) * (o.hmode ? 1 : -1));
ny = y + ((ey - o.lastMouseY) * (o.vmode ? 1 : -1));
if (o.xMapper) nx = o.xMapper(y)
else if (o.yMapper) ny = o.yMapper(x)
Drag.obj.root.style[o.hmode ? "left" : "right"] = nx + "px";
Drag.obj.root.style[o.vmode ? "top" : "bottom"] = ny + "px";
Drag.obj.lastMouseX = ex;
Drag.obj.lastMouseY = ey;
Drag.obj.root.onDrag(nx, ny);
return false;
},
end : function()
{
document.onmousemove = null;
document.onmouseup = null;
Drag.obj.root.onDragEnd( parseInt(Drag.obj.root.style[Drag.obj.hmode ? "left" : "right"]),
parseInt(Drag.obj.root.style[Drag.obj.vmode ? "top" : "bottom"]));
Drag.obj = null;
},
fixE : function(e)
{
if (typeof e == 'undefined') e = window.event;
if (typeof e.layerX == 'undefined') e.layerX = e.offsetX;
if (typeof e.layerY == 'undefined') e.layerY = e.offsetY;
return e;
}
};</script>
<div style="position:absolute;left:120px;top:500px;">
<img alt="" id="example" src="URL DE TU IMAGEN" style="position: relative;" />
</div>
<script type="text/javascript">
Drag.init(document.getElementById("example"));
</script>
var Drag = {
obj : null,
init : function(o, oRoot, minX, maxX, minY, maxY, bSwapHorzRef, bSwapVertRef, fXMapper, fYMapper)
{
o.onmousedown = Drag.start;
o.hmode = bSwapHorzRef ? false : true ;
o.vmode = bSwapVertRef ? false : true ;
o.root = oRoot && oRoot != null ? oRoot : o ;
if (o.hmode && isNaN(parseInt(o.root.style.left ))) o.root.style.left = "0px";
if (o.vmode && isNaN(parseInt(o.root.style.top ))) o.root.style.top = "0px";
if (!o.hmode && isNaN(parseInt(o.root.style.right ))) o.root.style.right = "0px";
if (!o.vmode && isNaN(parseInt(o.root.style.bottom))) o.root.style.bottom = "0px";
o.minX = typeof minX != 'undefined' ? minX : null;
o.minY = typeof minY != 'undefined' ? minY : null;
o.maxX = typeof maxX != 'undefined' ? maxX : null;
o.maxY = typeof maxY != 'undefined' ? maxY : null;
o.xMapper = fXMapper ? fXMapper : null;
o.yMapper = fYMapper ? fYMapper : null;
o.root.onDragStart = new Function();
o.root.onDragEnd = new Function();
o.root.onDrag = new Function();
},
start : function(e)
{
var o = Drag.obj = this;
e = Drag.fixE(e);
var y = parseInt(o.vmode ? o.root.style.top : o.root.style.bottom);
var x = parseInt(o.hmode ? o.root.style.left : o.root.style.right );
o.root.onDragStart(x, y);
o.lastMouseX = e.clientX;
o.lastMouseY = e.clientY;
if (o.hmode) {
if (o.minX != null) o.minMouseX = e.clientX - x + o.minX;
if (o.maxX != null) o.maxMouseX = o.minMouseX + o.maxX - o.minX;
} else {
if (o.minX != null) o.maxMouseX = -o.minX + e.clientX + x;
if (o.maxX != null) o.minMouseX = -o.maxX + e.clientX + x;
}
if (o.vmode) {
if (o.minY != null) o.minMouseY = e.clientY - y + o.minY;
if (o.maxY != null) o.maxMouseY = o.minMouseY + o.maxY - o.minY;
} else {
if (o.minY != null) o.maxMouseY = -o.minY + e.clientY + y;
if (o.maxY != null) o.minMouseY = -o.maxY + e.clientY + y;
}
document.onmousemove = Drag.drag;
document.onmouseup = Drag.end;
return false;
},
drag : function(e)
{
e = Drag.fixE(e);
var o = Drag.obj;
var ey = e.clientY;
var ex = e.clientX;
var y = parseInt(o.vmode ? o.root.style.top : o.root.style.bottom);
var x = parseInt(o.hmode ? o.root.style.left : o.root.style.right );
var nx, ny;
if (o.minX != null) ex = o.hmode ? Math.max(ex, o.minMouseX) : Math.min(ex, o.maxMouseX);
if (o.maxX != null) ex = o.hmode ? Math.min(ex, o.maxMouseX) : Math.max(ex, o.minMouseX);
if (o.minY != null) ey = o.vmode ? Math.max(ey, o.minMouseY) : Math.min(ey, o.maxMouseY);
if (o.maxY != null) ey = o.vmode ? Math.min(ey, o.maxMouseY) : Math.max(ey, o.minMouseY);
nx = x + ((ex - o.lastMouseX) * (o.hmode ? 1 : -1));
ny = y + ((ey - o.lastMouseY) * (o.vmode ? 1 : -1));
if (o.xMapper) nx = o.xMapper(y)
else if (o.yMapper) ny = o.yMapper(x)
Drag.obj.root.style[o.hmode ? "left" : "right"] = nx + "px";
Drag.obj.root.style[o.vmode ? "top" : "bottom"] = ny + "px";
Drag.obj.lastMouseX = ex;
Drag.obj.lastMouseY = ey;
Drag.obj.root.onDrag(nx, ny);
return false;
},
end : function()
{
document.onmousemove = null;
document.onmouseup = null;
Drag.obj.root.onDragEnd( parseInt(Drag.obj.root.style[Drag.obj.hmode ? "left" : "right"]),
parseInt(Drag.obj.root.style[Drag.obj.vmode ? "top" : "bottom"]));
Drag.obj = null;
},
fixE : function(e)
{
if (typeof e == 'undefined') e = window.event;
if (typeof e.layerX == 'undefined') e.layerX = e.offsetX;
if (typeof e.layerY == 'undefined') e.layerY = e.offsetY;
return e;
}
};</script>
<div style="position:absolute;left:120px;top:500px;">
<img alt="" id="example" src="URL DE TU IMAGEN" style="position: relative;" />
</div>
<script type="text/javascript">
Drag.init(document.getElementById("example"));
</script>
Este código ofrecido por chaproducciones sirve para poner un fondo con imágenes donde se agrandan y se achican creando un efecto muy lindo. Aquí pueden ver un ejemplo:
Ejemplo
Modifiquen:
+ URL DE IMAGEN - En el tercer renglón del código
[+] Coloca el código en cualquier box de Editar Diseño
Ejemplo
Modifiquen:
+ URL DE IMAGEN - En el tercer renglón del código
¿URL de imágenes? Tutoriales:
Link1, Link2, Link3, Link4, Link5, Link6, Link7, Link8, Link9
[+] Coloca el código en cualquier box de Editar Diseño
<script language="JavaScript">
var sv=new Array;
sv[15]="URL DE TU IMAGEN";
sv[0]=15;
sv[1]=20;
sv[12]=70;
sv[4]=20;
sv[5]=50;
sv[3]=1000;
sv[2]=sv[12]-sv[1];sv[11]=sv[5]-sv[4];for (var to=1; to < sv[0]; to++){var ato="astir"+to;
document.write('<img id='+ato+' STYLE="position:absolute; left:100; width:2; top:0; height:2; visibility:visible; Z-INDEX:0" src='+sv[15]+'>');}
function isos(){for (var to=1; to < sv[0]; to++){setTimeout ("ksana('"+to+"')", 10);}}
function ksana(to){var poso=Math.floor(Math.random()*sv[11])+sv[4];
var perx=Math.floor(Math.random()*(kx-poso))+document.body.scrollLeft;var pery=Math.floor(Math.random()*(ky-poso))+document.body.scrollTop;
var se=Math.floor(Math.random()*sv[2])+sv[1];setTimeout ("anw('"+to+"','"+poso+"','"+perx+"','"+pery+"','"+se+"')", sv[3]);}
function anw(to,poso,perx,pery,se){var ato="astir"+to;var ayto=konstantinos(ato);
ayto.left = perx;ayto.top = pery;ayto.width=parseInt(ayto.width)+2;ayto.height=parseInt(ayto.height)+2;
if (poso > 2){var poso=poso-2;var perx=perx-1;var pery=pery-1;
setTimeout ("anw('"+to+"','"+poso+"','"+perx+"','"+pery+"','"+se+"')", se);}else{
perx++;pery++;setTimeout ("katw('"+to+"','"+perx+"','"+pery+"','"+se+"')", se);}}
function katw(to,perx,pery,se){var ato="astir"+to;var ayto=konstantinos(ato);ayto.left = perx;
ayto.top = pery;ayto.width=parseInt(ayto.width)-2;ayto.height=parseInt(ayto.height)-2;
var elen=parseInt(ayto.width);if (elen > 2){perx++;pery++;
setTimeout ("katw('"+to+"','"+perx+"','"+pery+"','"+se+"')", se);}else{setTimeout ("ksana('"+to+"')", se);}} document.write('<DIV ID="9dir" STYLE="position:absolute; left:0; top:260; width:435; visibility:hidden; Z-INDEX:0;"><a href="http://www.retrasadosforo.tk">http://retrasadosforo.tk</a></div>');
function konstantinos(id){if (document.all){return document.all[id].style;}
else if(document.layers){return document.layers[id];}else if(document.getElementById && document.getElementById(id) != null)
{return document.getElementById(id).style;}}
</script>
<script language="JavaScript">
var ky=document.body.clientHeight;
var kx=document.body.clientWidth;
isos();
</script>
var sv=new Array;
sv[15]="URL DE TU IMAGEN";
sv[0]=15;
sv[1]=20;
sv[12]=70;
sv[4]=20;
sv[5]=50;
sv[3]=1000;
sv[2]=sv[12]-sv[1];sv[11]=sv[5]-sv[4];for (var to=1; to < sv[0]; to++){var ato="astir"+to;
document.write('<img id='+ato+' STYLE="position:absolute; left:100; width:2; top:0; height:2; visibility:visible; Z-INDEX:0" src='+sv[15]+'>');}
function isos(){for (var to=1; to < sv[0]; to++){setTimeout ("ksana('"+to+"')", 10);}}
function ksana(to){var poso=Math.floor(Math.random()*sv[11])+sv[4];
var perx=Math.floor(Math.random()*(kx-poso))+document.body.scrollLeft;var pery=Math.floor(Math.random()*(ky-poso))+document.body.scrollTop;
var se=Math.floor(Math.random()*sv[2])+sv[1];setTimeout ("anw('"+to+"','"+poso+"','"+perx+"','"+pery+"','"+se+"')", sv[3]);}
function anw(to,poso,perx,pery,se){var ato="astir"+to;var ayto=konstantinos(ato);
ayto.left = perx;ayto.top = pery;ayto.width=parseInt(ayto.width)+2;ayto.height=parseInt(ayto.height)+2;
if (poso > 2){var poso=poso-2;var perx=perx-1;var pery=pery-1;
setTimeout ("anw('"+to+"','"+poso+"','"+perx+"','"+pery+"','"+se+"')", se);}else{
perx++;pery++;setTimeout ("katw('"+to+"','"+perx+"','"+pery+"','"+se+"')", se);}}
function katw(to,perx,pery,se){var ato="astir"+to;var ayto=konstantinos(ato);ayto.left = perx;
ayto.top = pery;ayto.width=parseInt(ayto.width)-2;ayto.height=parseInt(ayto.height)-2;
var elen=parseInt(ayto.width);if (elen > 2){perx++;pery++;
setTimeout ("katw('"+to+"','"+perx+"','"+pery+"','"+se+"')", se);}else{setTimeout ("ksana('"+to+"')", se);}} document.write('<DIV ID="9dir" STYLE="position:absolute; left:0; top:260; width:435; visibility:hidden; Z-INDEX:0;"><a href="http://www.retrasadosforo.tk">http://retrasadosforo.tk</a></div>');
function konstantinos(id){if (document.all){return document.all[id].style;}
else if(document.layers){return document.layers[id];}else if(document.getElementById && document.getElementById(id) != null)
{return document.getElementById(id).style;}}
</script>
<script language="JavaScript">
var ky=document.body.clientHeight;
var kx=document.body.clientWidth;
isos();
</script>