HTML DOM HR 对象
- 上一页 <h1> - <h6>
- 下一页 <html>
HR object
The HR object represents the HTML <hr> element.
Access HR object
You can use getElementById() to access the <hr> element:
var x = document.getElementById("myHR");
Create HR object
You can use the document.createElement() method to create an <hr> element:
var x = document.createElement("HR");
HR object properties
属性 | Description |
---|---|
align |
HTML5 中不支持。请改用 style.textAlign。 Set or return the alignment of the horizontal line. |
color |
HTML5 中不支持。请改用 style.color。 Set or return the color of the horizontal line. |
noshade |
HTML5 中不支持。 Set or return whether the horizontal line should be presented in a solid color (without shadow). |
size |
HTML5 中不支持。请改用 style.height。 Set or return the height of the horizontal line. |
width |
HTML5 中不支持。请改用 style.width。 设置或返回水平线的宽度。 |
相关页面
HTML 参考手册:HTML <hr> 标签
- 上一页 <h1> - <h6>
- 下一页 <html>