Example Analysis of HTML DOM display attribute Syntax
Today, I will talk to you about the example analysis of HTML DOM display attribute syntax, many people may not know much about it. In order to make you understand better, the editor has summarized the following content for you. I hope you can get something according to this article.
Here we describe the definition and usage of the HTML DOM display attribute. The HTML DOM display attribute is mainly used to set how the element is displayed. For example, when the attribute value is none, it means that the element will not be displayed, while block means that the element will be displayed as a block-level element with a newline character before and after it.
Definition and usage of HTML DOM display attribute
This property is mainly used to set how the element is displayed.
Syntax:
Object.style.display=value
Possible value
HTML DOM display attribute instance
This example setting does not display elements:
Function removeElement () {document.getElementById ("p1") .style.display = "none";} Hello This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text.