How javascript hides element borders
This article mainly explains the "javascript how to hide the element border", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "javascript how to hide the element border" bar!
In JavaScript, the border attribute of the style object can be used to hide the border of the element, and the border attribute can set all border properties in a declaration. When the property value is set to "none", the border is hidden with the syntax of "element object .style.border =" none ";".
The operating environment of this tutorial: windows10 system, javascript1.8.5 version, Dell G3 computer.
How javascript hides element boundaries
The Style object represents a separate style declaration. The Style object can be accessed from the document or element to which the style is applied.
Use the syntax for Style object properties:
Document.getElementById ("id") .style.property= "value"
The border property sets all border properties in one declaration.
Syntax:
Object.style.border=borderWidth borderStyle borderColor
Examples are as follows:
123function displayDate () {document.getElementById ('demo'). Style.border= "none";} this is a paragraph