If you want to treat a piece of text as a button for the JS effect, you may need to wrap the text in the gap and assign the function that you are trying to run the onclick handler to this gap. If you use, say, jQuery, it might look like
<script type="text/javascript"> </script> <p><span id="myButtonText">Click Me for an Alert!</span></p>
source share