<script type="text/javascript">
function setTextDecoration()
document.getElementById("p1").style.textDecoration="overline";
<p id="p1">This is an example paragraph.</p>
<input type="button" onclick="setTextDecoration()" value="Set text-decoration" />