<html>
<head>
<style type="text/css">
#ex1
{
border: thin dotted #FF0000;
}
</style>
<script>
function displayResult()
{
document.getElementById("ex1").style.borderRight="thick solid #0000FF";
}
</script>
</head>
<body>
<div id="ex1">This is some text.</div>
<br>
<button type="button" onclick="displayResult()">Change right border</button>
</body>
</html>