{"id":6548544,"date":"2015-09-15T17:05:42","date_gmt":"2015-09-15T17:05:42","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/button-link-6\/"},"modified":"2016-08-30T18:01:56","modified_gmt":"2016-08-30T18:01:56","slug":"button-link-6","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/button-link-6\/","title":{"rendered":"button-link"},"content":{"rendered":"<p>Hi Guys<\/p>\n<p>I am trying to add back button\/link to a page currently I am trying to use this code.<\/p>\n<p>&lt;input type=&#8221;button&#8221; value=&#8221;Previous Page&#8221; onclick=&#8221;goBack()&#8221;&gt;<\/p>\n<pre><code>&lt;script&gt;\nfunction goBack() {\nwindow.history.back()\n}\n&lt;\/script&gt;<\/code><\/pre>\n<p>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. <\/p>\n<p>Is there a way to get the above to work?<\/p>\n<p>or <\/p>\n<p>Is there a wordpress way to have a button\/link that when clicked returns to the previous page?<\/p>\n","protected":false},"template":"","class_list":["post-6548544","topic","type-topic","status-publish","hentry","topic-tag-button","topic-tag-href","topic-tag-link","topic-tag-onclick"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/6548544","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/6548544\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=6548544"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}