为什么此代码不转到 Link?
Why Doesn't This Code Go To the Link?
<html>
<body>
<a href="https://account.mojang.com/login" id="clickHere" target="_blank">Click Here</a>
</body>
</html>
当我 运行 html 文件时,为什么这个 html 代码没有转到网站 https://account.mojang.com/login?
除非您点击 link,否则什么也不会发生。
要使其自动运行,请使用:
<script>window.location.href = 'https://account.mojang.com/login';</script>
<html>
<body>
<a href="https://account.mojang.com/login" id="clickHere" target="_blank">Click Here</a>
</body>
</html>
当我 运行 html 文件时,为什么这个 html 代码没有转到网站 https://account.mojang.com/login?
除非您点击 link,否则什么也不会发生。
要使其自动运行,请使用:
<script>window.location.href = 'https://account.mojang.com/login';</script>