问题是如何创建重试与网站连接的按钮。不工作是:
<a href="the page you are currently on">Retry/Refresh</a>
答案 0 :(得分:1)
尝试version b
答案 1 :(得分:0)
工作代码应为:
<button onclick="retryConnect()">Retry</button>
<script>
function retryConnect(){
location="retry.html";
}
</script>
在同一目录中创建一个名为retry.html的文件,并在其中写入:
<p onload="loadPage()">Please wait...</p>
<script>
var delayLoad;
function loadPage() {
delayLoad = setTimeout(showPage, 1000);
}
function showPage() {
location="the previous page";
}
</script>