Thursday, December 6, 2012

style.borderTopColor

Properti style.borderTopColor digunakan untuk menetapkan warna border atas suatu elemen.

Sintaks:

obj.style.borderTopColor = value;

Nilainya:

Contoh:

<HTML> <HEAD> <TITLE>style.borderTopColor</TITLE> <STYLE TYPE="text/css"> #mydiv { width: 500px; height: 500px; margin: 0 auto; border: solid red 1px; } </STYLE> </HEAD> <BODY> <DIV ID="mydiv"></DIV> <SCRIPT TYPE="text/javascript"> document.getElementById("mydiv").style.borderTopColor = "green"; </SCRIPT> </BODY> </HTML>