Is it possible to have an html link that links to a different html page without clicking?

痞子三分冷 提交于 2019-12-11 23:23:53

问题


I have some autogenerated html documentation for a python project. When autogenerating this the 'main page' is created as index.html inside /manual/_build/html/index.html. I want to have a manual.html in the root folder that links to the index.html. I can put the following in manual.html:

<a href="manual/_build/html/index.html">link</a>

which makes a clickable link to index.html. I would like to be send directly to index.html without having to click on anything. Is this possible?

Thanks, Niek


回答1:


Add the following to your HTML <head> tag:

<meta HTTP-EQUIV="REFRESH" content="0; url=index.html">



回答2:


Just redirect it to index.html..Write this in manual.html...

<script>
document.location = "manual/_build/html/index.html";
</script>


来源:https://stackoverflow.com/questions/10140699/is-it-possible-to-have-an-html-link-that-links-to-a-different-html-page-without

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!