<html>
<head>
<style>
p
{
border: thick solid #FF0000
}
</style>
<script type="text/javascript">
function changeBorder()
{
document.getElementById("p1").style.borderStyle="dotted double";
}
</script>
</head>
<body>
<form>
<input type="button" onclick="changeBorder()" value="Change paragraph border style" />
</form>
<p id="p1">This is a paragraph</p>
</body>
</html>