Title: button-link
Last modified: August 30, 2016

---

# button-link

 *  [allanit](https://wordpress.org/support/users/allanit/)
 * (@allanit)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/button-link-6/)
 * Hi Guys
 * I am trying to add back button/link to a page currently I am trying to use this
   code.
 * <input type=”button” value=”Previous Page” onclick=”goBack()”>
 *     ```
       <script>
       function goBack() {
       window.history.back()
       }
       </script>
       ```
   
 * but I am having many problems. Lets for the moment assume that I can get the 
   javascript working. When I put the input on the page wordpress strips the onclick
   event or the href so the code does not run.
 * Is there a way to get the above to work?
 * or
 * Is there a wordpress way to have a button/link that when clicked returns to the
   previous page?

The topic ‘button-link’ is closed to new replies.

## Tags

 * [button](https://wordpress.org/support/topic-tag/button/)
 * [href](https://wordpress.org/support/topic-tag/href/)
 * [link](https://wordpress.org/support/topic-tag/link/)
 * [onclick](https://wordpress.org/support/topic-tag/onclick/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [allanit](https://wordpress.org/support/users/allanit/)
 * Last activity: [10 years, 9 months ago](https://wordpress.org/support/topic/button-link-6/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
