我怎样才能做到这一点?我想在 history.go 之后自动刷新我的页面。我发布了我的整个 html
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="css/styles.css"/>
<link rel="shortcut icon" href="img/favicon.png" type="image/png">
<script src="//cdnjs.cloudflare.com/ajax/libs/json2/20110223/json2.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
<script src="https://raw.github.com/andris9/jStorage/master/jstorage.js"></script>
<script>
$.jStorage.set("reload", true);
if ($.jStorage.get("reload") === true) {
$.jStorage.set("reload", false);
window.location.reload()
}
</script>
<script>
function goBack(){
window.history.go(-2);
}
</script>
<title>Edit Success</title>
</head>
<body>
<div id="container">
<div id="content">
<div class="md-modal md-show" id="modal-1">
<div id="notifMessage">
<h1>The information have been updated.</h1>
<p><a onclick='goBack();'>View Patients</a></p>
</div>
</div>
</div>
</div>
</body>
我用我的整个 html 对其进行了编辑,并替换了你发布的内容,但仍然无法正常工作,或者我在实现它时出错了