//有错误的欢迎大佬指证
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<script type="text/javascript">
//更改html的默认打开路径可以使用preferences中的editor中的文件助手进行默认设置
//Location对象代表了当前页面的地址
//属性 href 用来改变当前页面的地址
//方法 reload方法 刷新当前页面 还可以接收一个参数,可以填写一个url,刷新到url指定界面
function fun1(){
window.location.href="https://www.baidu.com/";}
function fun2(){
window.location.reload();}
</script>
</head>
<body>
<input type="button" value="百度" οnclick="fun1();"/>
<input type="button" value="刷新当前界面" οnclick="fun2();"/>
</body>
</html>