[英]How to auto redirect from one URL to another
I would like a little help with iframe
coding to specifically redirect from one URL to another without the user having to click anything to be redirected. 我想为
iframe
编码提供一点帮助,以专门从一个URL重定向到另一个URL,而无需用户单击要重定向的任何内容。
iframe id="schedulista-widget-00" src="https://www.schedulista.com/schedule/neecostylez?mode=widget&rt_url=http%3A%2F%2Fwww.neecostylez.com&rt_text=Click+HERE+to+return+to+the+site" allowtransparency="true" frameborder="0" scrolling="no" width="100%" height="900px"> iframe id =“ schedulista-widget-00” src =“ https://www.schedulista.com/schedule/neecostylez?mode=widget&rt_url=http%3A%2F%2Fwww.neecostylez.com&rt_text=Click+HERE+to+return + to + the + site“ allowtransparency =” true“ frameborder =” 0“ scrolling =” no“ width =” 100%“ height =” 900px“>
Everything works fine except I don't want users to have to click to be redirected and not be able to see the text specifying to "click here". 一切正常,除了我不希望用户必须单击以进行重定向并且无法看到指定为“单击此处”的文本。 I just want it to be redirected.
我只希望它被重定向。
I found the below code but I'm not sure where to plug in the details needed to put in order for successful results. 我找到了下面的代码,但是我不确定在哪里插入为取得成功结果所需的详细信息。
<html>
<head>
</head>
<body>
<a id="link" target="_parent" href="outsideDomain.html"></a>
<script type="text/javascript">
document.getElementById('link').click();
</script>
</body>
</html>
Simply use a meta http-equiv
tag to "refresh" the page to a new url as follows: 只需使用meta
http-equiv
标签将页面“刷新”到新的url,如下所示:
<meta http-equiv="refresh" content="0; url=/path/to/go/to/file.html">
The content sets how long to wait until to redirect the user, and the url sets where to redirect the user. 内容设置要等到重定向用户的时间, URL设置要重定向用户的位置。
You could use the meta http-equiv tag as k97513 mentioned. 您可以使用提及的meta http-equiv标签,如k97513。 You could also use JavaScript as follows.
您还可以如下使用JavaScript。
<script>
window.location = "https://www.google.com";
</script>
Just place that in the body tag and replace Google with whatever URL you want to redirect to. 只需将其放在body标签中,然后将Google替换为您要重定向到的所有URL。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.