Javascript examples for CSS Style Property:borderTopStyle
The borderTopStyle property sets or gets the top border style.
Value | Description |
---|---|
none | No border will be displayed. |
hidden | Same as 'none' |
dotted | a series of dots. |
dashed | a series of short line segments i.e. dashes. |
solid | a single solid line. |
double | a two parallel solid lines. |
groove | Looks like carved into the canvas. |
ridge | opposite effect of 'groove'. |
inset | Looks like embedded in the canvas. |
outset | opposite effect of 'inset'. |
initial | Sets this property to its default value. |
inherit | takes the computed value of its parent element border-bottom-style property. |
Item | Value |
---|---|
Default Value: | none |
Return Value: | A String, representing the style of an element's top border |
CSS Version | CSS1 |
Get top border of a <div> element:
<!DOCTYPE html> <html> <body> <div id="myDiv" style="border-top:double;">This is a div.</div> <br> <button type="button" onclick="myFunction()">Return top border style</button> <script> function myFunction() {/*from w w w . ja v a 2 s . c o m*/ console.log(document.getElementById("myDiv").style.borderTopStyle); } </script> </body> </html>