Home > Article > Web Front-end > Introduction to three methods of returning to the previous page in JavaScript and their differences_javascript skills
JavaScript returns to the previous page code difference:
window.history.go(-1); //返回上一页 window.history.back(); //返回上一页 //如果要强行刷新的话就是:window.history.back();location.reload(); window.location.go(-1); //刷新上一页