3 examples of 'html back button' in JavaScript

Every line of 'html back button' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
this disclaimer
57function getBackButton() {
58 return document.getElementById("button-back");
59}
Important

Use secure code every time

Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code

92function backBtn(){
93 var limit = parseInt($("#limithid").text());
94 var offset = parseInt($("#offsethid").text());
95 var rowcount = parseInt($("#rowcounthid").text());
96 var top = (offset + limit);
97
98 $("#rightbtn").attr('disabled', false);
99
100 if (offset <= 0) {
101 offset = 0;
102 $("#leftbtn").attr('disabled', true);
103
104 } else {
105 top = (offset);
106 offset = (offset - limit);
107 }
108
109 $("#rowcount").html(rowcount);
110 $("#pageCount").html(offset+"-"+ top +" of ");
111 $("#offsethid").text(offset);
112
113
114 $.ajax({
115 type: "GET",
116 url: "ajax/maillogajax.php",
117 data: "limit="+limit+"&offset="+offset,
118 dataType: 'HTML',
119 beforeSend: function () {
120 $('#mailLogOutput').html("<p class='text-center'><img class='verloader' src='../login/images/load.gif'></p>");
121 },
122 success: function (html) {
123 $('#mailLogOutput').html(html).promise().done(function(){
124 $.getScript('js/selector.js');
125 });
126 },
127
128 error: function (textStatus, errorThrown) {
129
130 console.log(textStatus);
131 console.log(errorThrown);
132 }
133 });
134};
102function back() {
103 document.getElementById("card-wrapper").className = "";
104 document.getElementById("c1").setAttribute("style", "");
105 push()
106}

Related snippets