Objek HR DOM HTML
Objek SDM
Objek HR mewakili elemen <hr> HTML.
Mengakses Objek HR
Anda dapat mengakses elemen <hr> dengan menggunakan getElementById():
Contoh
var x = document.getElementById("myHR");
Buat Objek HR
Anda dapat membuat elemen <hr> dengan menggunakan metode document.createElement() :
Contoh
var x = document.createElement("HR");
Properti Objek HR
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 |
Properti dan Acara Standar
Objek HR juga mendukung properti dan event standar .
Halaman Terkait
Referensi HTML: tag HTML <hr>