<a href="https://www.baidu.com/" target="_blank"> <button>進入baidu首頁</button> </a>
<button onclick="window.location.href = 'https://www.baidu.com/' target="_blank"">進入baidu首頁</button>
<meta http-equiv="refresh" content="5;url=hello.html">
http-equiv=“refresh” 是刷新頁面,5秒後執行刷新操作,url是跳轉的目的頁面位址。
<meta http-equiv="refresh" content="5">
這行程式碼的意思是只刷新,不跳轉。
立即跳到hello.html頁面。
<script type="text/javascript"> window.location.href = 'hello.html'; </script>
或者
<script language="javascript">
location.replace("http://www.baidu.com/");
</script>5秒後跳到hello.html頁面。
<script type="text/javascript">
setTimeout("window.location.href = 'hello.html'", 5000);
</script><script type="text/javascript">
var wapurl = window.location.pathname;
if
(/Android|webOS|iPhone|iPod|BlackBerry|Windows CE|Windows Phone/i.test(navigator.userAgent))
{if
(window.location.href.toLowerCase().indexOf("?pc")<0)
{try
{window.location.href="/wap"+wapurl}
catch(e){}}
}
</script>到此這篇關於html頁面點擊按鈕實現頁面跳轉的文章就介紹到這了,更多相關html點擊按鈕跳轉頁面內容請搜尋downcodes.com以前的文章或繼續瀏覽下面的相關文章,希望大家以後多多支援downcodes.com!