javascript - Disable back button to home page after logout -
in below code calling logoutfunction(), after click it's going index.html page but, again it's coming home page after clicking button page
home.html
<div role="main" class="ui-content"> <h3 class="ui-title">are sure want logout?</h3> <a href="#" class="ui-btn ui-corner-all ui-shadow ui-btn-inline ui-btn-b" data-rel="back">cancel</a> <a href="#index" onclick="logoutfunction()" class="ui-btn ui-corner-all ui-shadow ui-btn-inline ui-btn-b" data-iconpos="notext" data-direction="reverse">logout</a> </div> <script> function logoutfunction() { localstorage.login="false"; window.location.href = "index.html"; } </script>
index.html
below code wrote on index page it's not working
<script type="text/javascript"> window.history.forward(); function noback() { window.history.forward(); } </script>
thanks
wiki
Comments
Post a Comment