[英]Redirect from an HTML page to another page to a title
是否可以設置按鈕鏈接以重定向到另一個頁面的標題?
例如,在菜單中,我有“已實現項目”頁面,並希望重定向到“歡迎”頁面,其中我的作品集標題為“已實現項目”。 是否可以使用我現在使用的腳本來做到這一點?
<script>
setTimeout(function(){location.href="http://example.com/alternate_url.html"} , 0);
</script>
我需要這樣的東西,但在加載頁面后重定向: <a href="http://example.com/alternate_url.html" title="test">test</a>
這個問題有點棘手。 但我使用的是糟糕的網站構建器,不會讓我編輯按鈕代碼,讓我只編輯 html 正文腳本:)
你可以用這個
喜歡
<script> setTimeout(function(){location.replace("http://example.com/alternate_url.html");}, 0); </script>
這有效:)
<script>
setTimeout(function(){location.href="http://example.com/alternate_url.html",title="test"} , 0);
</script>
<h2 id="test">Title</h2>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.