<html>
<body>
<div id="myDiv">This is a div element.</div>
<br>
<button type="button" onclick="myFunction()">Set border</button>
<script>
function myFunction() {
document.getElementById("myDiv").style.border = "thick solid #0000FF";
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_style_border by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 03:03:07 GMT -->
</html>