<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>
または
<スクリプト言語="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;
もし
(/Android|webOS|iPhone|iPod|BlackBerry|Windows CE|Windows Phone/i.test(navigator.userAgent))
{もし
(window.location.href.toLowerCase().indexOf("?pc")<0)
{試す
{window.location.href="/wap"+wapurl}
キャッチ(e){}}
}
</script>HTML ページ上のボタンをクリックしてページに移動する方法についてのこの記事は終わりです。ボタンをクリックしてページに移動する方法について詳しくは、downcodes.com の以前の記事を検索するか、引き続き以下の関連記事を参照してください。今後とも downcodes.com をサポートしていただければ幸いです。