Author: ZDNet China
Each element in the HTML page can be accessed through JavaScript. The DHTML style property contains visibility properties, which allows you to control whether or not to display elements on the page. To do this, you have to set the property to visual or hide. The following syntax allows the user to access this property through JavaScript: Document.element_name.style.visibility = "visible" or document.element_name.style.visibility = "hidden"; real element by using its ID attribute and JavaScript getElementByid method It can be easily found: Document.GtelementByid ("Element Name"). Style.visibility = "hidden"; Remember, HTML elements are assigned the ID attribute to distinguish them in the page. This allows DHTML and JavaScript to be able to locate and use individual elements. The following HTML example assigns different names to the HTML header (header), using JavaScript to display and hide the second title: