border: thin solid #00FF00;
outline: thick solid #FF0000;
<script type="text/javascript">
document.getElementById("p1").style.outline="thin dotted #0000FF";
<input type="button" onclick="changeOutline()" value="Change outline" />
<p id="p1">This is a paragraph</p>