<a>Play!</a> <script type="text/javascript"> window.onload = function(){ var a = document.getElementsByTagName('a')[0]; a.innerHTML = a.innerHTML.replace(/Play!/,'Stop!'); }; </script>