Objet HTML DOM HR
Objet RH
L'objet HR représente un élément HTML <hr>.
Accéder à un objet RH
Vous pouvez accéder à un élément <hr> en utilisant getElementById() :
Exemple
var x = document.getElementById("myHR");
Créer un objet RH
Vous pouvez créer un élément <hr> en utilisant la méthode document.createElement() :
Exemple
var x = document.createElement("HR");
Propriétés de l'objet RH
Property | Description |
---|---|
align | Not supported in HTML5. Use style.textAlign instead. Sets or returns the alignment of a horizontal line |
color | Not supported in HTML5. Use style.color instead. Sets or returns the color of a horizontal line |
noshade | Not supported in HTML5. Sets or returns whether a horizontal line should render in one solid color (noshaded) |
size | Not supported in HTML5. Use style.height instead. Sets or returns the height of a horizontal line |
width | Not supported in HTML5. Use style.width instead. Sets or returns the width of a horizontal line |
Propriétés et événements standard
L'objet HR prend également en charge les propriétés et événements standard .
Pages connexes
Référence HTML : balise HTML <hr>