<html>
<head>
<style>
#myDiv {
border: thick solid blue;
}
</style>
</head>
<body>
<div id="myDiv">This is a div element.</div>
<br>
<button type="button" onclick="myFunction()">Change right border</button>
<script>
function myFunction() {
document.getElementById("myDiv").style.borderRight = "thin dotted red";
}
</script>
</body>
</html>