HTML DOM propiedad Altura de la imagen
Definición y Uso
conjuntos de propiedades de altura o devuelve el valor de la propiedad de la altura de la imagen.
atributo height especifica la altura de la imagen.
gramática
imageObject.height=pixels
Soporte para el navegador
Todos los principales navegadores soportan atributo de altura
Ejemplos
Ejemplos
Los siguientes ejemplos establecen la altura de la imagen y el ancho:
<! DOCTYPE html>
<Html>
<Head>
<Charset Meta = "UTF-8">
<Title> Este tutorial (w3big.com) </ title>
<Script>
changeSize función () {
document.getElementById ( "Compman") height = "250" .;
document.getElementById ( "Compman") width = "300" .;
}
</ Script>
</ Head>
<Cuerpo>
<Img id = "Compman" src = "compman.gif" width = "107" height = "98">
<br>
<Input type "botón" = onclick = "changeSize ()" value = "modificar el tamaño de la imagen">
</ Body>
</ Html>
<Html>
<Head>
<Charset Meta = "UTF-8">
<Title> Este tutorial (w3big.com) </ title>
<Script>
changeSize función () {
document.getElementById ( "Compman") height = "250" .;
document.getElementById ( "Compman") width = "300" .;
}
</ Script>
</ Head>
<Cuerpo>
<Img id = "Compman" src = "compman.gif" width = "107" height = "98">
<br>
<Input type "botón" = onclick = "changeSize ()" value = "modificar el tamaño de la imagen">
</ Body>
</ Html>
Trate »
objeto de imagen