Preobjeto HTML DOM
Objeto anterior
El objeto Pre representa un elemento HTML <pre>.
Acceder a un objeto previo
Puede acceder a un elemento <pre> usando getElementById():
Ejemplo
var x = document.getElementById("myPre");
Crear un objeto previo
Puede crear un elemento <pre> utilizando el método document.createElement():
Ejemplo
var x = document.createElement("PRE");
Propiedades previas al objeto
Property | Description |
---|---|
width | Not supported in HTML5. Use
style.width instead. Sets or returns the value of the width attribute of the preformatted text |
Propiedades y eventos estándar
El objeto Pre también admite las propiedades y eventos estándar .
páginas relacionadas
Tutorial HTML: formato de texto HTML
Referencia HTML: etiqueta HTML <pre>