Hai, I want to ask about accessing back key in HTML5.

For example, I create new HTML5 project with HTML5 template in VS2012. suppose my project include 4 pages, and we go to the fourth page. and when I touch on back key, my project is terminate, not go back to the third page. my question is how to set the back key to go back to the previous page? not to terminate the application. anyone have the code example in HTML5?