JQ achieve browser back mechanism

  Jsp encountered a background management sub-project route click on the button can not go back, try location.href, history.go (-1) will not work.

  Read the information, try btn replaced <a href="javascript:history.go(-1)"> Back </a> enough. The same methods are: 

<a href="javascript:location.reload()"> reload the page to refresh the local </a> 

<a href="javascript:history.go(-1);location.reload()"> Back reload the page to refresh the local </a>

Back and reload the page

<a href="#" onclick="self.location=document.referrer;">返回</a> 

 

If the user selects the content <a> tab, the browser will attempt to retrieve and display the document href attribute specifies the URL indicated, or perform a list of JavaScript expressions, methods and functions.

<input type="button" name="back" value="重新填写" 

onclick="javascript:history.back(-1);"/>

history.back (-1): Back direct current page, all the data messages, a new page

history.go (-1): Returns the previous page is, but also all form data

Guess you like

Origin www.cnblogs.com/54sister/p/11204410.html