javascript borderTop property
Translation results:
border
UK[ˈbɔ:də(r)] US[ˈbɔ:rdə(r)]
n.Border; edge; edging; wrapping Edge
vt.& vi. Bound with, on the edge of...
vt. Along the edge of, surround..., edge...
vi. Approximate, adjacent
Third person singular: borders Plural: borders Present participle: bordering Past tense: bordered Past participle: bordered
top
英[ tɒp] 美[tɑ:p]
n. Top, top; (box) cover, (book pages, etc.) upper column; chief; top
adj. The highest; top ; first-class; the largest
vt. form the top; reach the top of...; be at the forefront of...; leader
vi. Summary; transcend; tower; end
Third person singular: tops Plural: tops Present participle: topping Past tense: topped Past participle: topped
javascript borderTop propertysyntax
Function: Set all properties for the top border.
Syntax: Object.style.borderTop=borderWidth borderStyle borderColor
##Parameters: borderWidth Set the width of the border. borderStyle sets the style of the border. borderColor Set the color of the border.
javascript borderTop propertyexample
<html> <head> <style type="text/css"> p { border: thin dotted #FF0000 } </style> <script type="text/javascript"> function changeBorder() { document.getElementById("p1").style.borderTop="thick solid #0000FF"; } </script> </head> <body> <input type="button" onclick="changeBorder()" value="Change top border" /> <p id="p1">This is a paragraph</p> </body> </html>
Run instance »
Click the "Run instance" button to view the online instance