change link text in HTML using JavaScript

<a href="" onClick="this.innerHTML = 'close'">Open</a>

You could also call some type of toggle function for swapping the text on multiple clicks.

function toggle(lnk_obj){
    lnk_obj.innerHTML = (lnk_obj.innerHTML == 'close') ? 'open' : 'close' ;
}


<a href="" onClick="javascript:toggle(this);">Open</a>

Script

<html>
  <head>
    <script type="text/javascript">
      function open_fun() {
        document.getElementById('link').innerHTML = "<a href='javascript:clo_fun()'>CLOSE</a>";
      }
      function clo_fun() {
        document.getElementById('link').innerHTML = "<a href='javascript:open_fun()'>OPEN</a>";
      }
    </script>
  </head>
  <body>
    <div id='link'><a href='javascript:open_fun()'>OPEN</a></div>
  </body>
</html>