1。
<input type="button" value="刷新按钮1" onClick="ReloadButton()">
<script type="text/javascript">
function ReloadButton(){
location.href="1.jsp";
}
</script>
<input type="button" value="刷新按钮2" onClick="history.go(0)">
2.
1 <%@ page language="java" contentType="text/html; charset=UTF-8" 2 pageEncoding="UTF-8"%> 3 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 4 <html> 5 <head> 6 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 7 <title>Insert title here</title> 8 </head> 9 <body oncontextmenu="return false"> 10 AAAAAAAA 11 <input type="button" value="前进" onClick="history.go(1);return true"> 12 13 <form> 14 <input type="button" value="返回上一步" onClick="history.back(-1)"> 15 </form> 16 17 <input type="button" name="view" value="查看源码" onclick="open()"> 18 19 <input type="button" value="刷新按钮1" onClick="ReloadButton()"> 20 21 <input type="button" value="刷新按钮2" onClick="history.go(0)"> 22 </body> 23 <script type="text/javascript"> 24 function ReloadButton(){ 25 location.href="http://localhost:8080/jsTest/1.jsp"; 26 } 27 </script> 28 </html>