HTML DOM Pre Object
Voorvoorwerp
Die Pre-objek verteenwoordig 'n HTML <pre>-element.
Toegang tot 'n Pre Object
Jy kan toegang tot 'n <pre> element kry deur getElementById():
Voorbeeld
var x = document.getElementById("myPre");
Skep 'n Pre Object
Jy kan 'n <pre> element skep deur die document.createElement() metode te gebruik:
Voorbeeld
var x = document.createElement("PRE");
Voorobjek eienskappe
Property | Description |
---|---|
width | Not supported in HTML5. Use
style.width instead. Sets or returns the value of the width attribute of the preformatted text |
Standaard eiendomme en geleenthede
Die Pre-objek ondersteun ook die standaard eienskappe en gebeurtenisse .
Verwante bladsye
HTML-tutoriaal: HTML-teksformatering
HTML-verwysing: HTML <pre> tag