Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<head>
<style> 
#myDIV {
  border: 1px solid black;
  width: 300px;
  height: 300px;
}
</style>
</head>
<body>
<h1>Change border-right with JavaScript</h1>
<p>Click the "Try it" button to change the border-right property of the DIV element:</p>
<button onclick="myFunction()">Try it</button>
<div id="myDIV">
  <h1>Hello</h1>
</div>
<script>
function myFunction() {
  document.getElementById("myDIV").style.borderRight = "5px dotted lightblue";
}
</script>
</body>
<!-- Mirrored from www.mdssup.ma/cssref/tryit.asp?filename=trycss_js_border-right by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 05 Sep 2022 15:15:37 GMT -->
</html>