Monday, August 13, 2012

Back button javascript html go back history

Back button javascript html go back history: Problem: Need to add back button in HTML which should take the user back in browser history. Solution: We can use simple javascript “history.go(-1)” which points to back history in browser. Let us discuss how to use in code. Javascript History: The History object contains an array of previously visited URLs by the visitor. history.back() takes user to back in the history. Back button with inline JavaScript: <input type="button" value="Go Back" onclick="history.back(-1)" />   Above code displays simple button in browser which onClick takes user back to the history. history.back(-1) takes the user to previous page, “-1″ points ... Related

DIGITAL JUICE

No comments:

Post a Comment

Thank's!