Javascript examples for CSS Style Property:borderTop
Return the border-top property values of a <div> element:
<!DOCTYPE html> <html> <body> <div id="myDiv" style="border-top:5px solid red;">This is a div element.</div> <br> <button type="button" onclick="myFunction()">Return top border</button> <script> function myFunction() {//ww w . j av a 2 s. co m console.log(document.getElementById("myDiv").style.borderTop); } </script> </body> </html>