lunes, 22 de julio de 2013
Crecer y disminuir DIV con javascript
function AumnetarTamanio(pAumentar){
var tabla = document.getElementById("divDinamic");
var anchoTabla = tabla.offsetWidth;
var altoTabla = tabla.offsetHeight;
altoTabla = altoTabla + pAumentar + "px"
document.getElementById("divDinamic")
.style.height = altoTabla ;
// .style.height="400px";
//alert("NewHeigth " + altoTabla) ;
}
function DisminuirTamanio(pDisminuir){
var tabla = document.getElementById("divDinamic");
var anchoTabla = tabla.offsetWidth;
var altoTabla = tabla.offsetHeight;
altoTabla = altoTabla - pDisminuir; //+ "px" ;
altoTabla = altoTabla + "px";
document.getElementById("divDinamic")
.style.height = altoTabla ;
}
Suscribirse a:
Enviar comentarios (Atom)
No hay comentarios:
Publicar un comentario