如何让这个自动打开而不需要按下?
How do I make This Open Automatically and not need to be pressed?
I have a website 运行ning inside an iframe but when links are selected they 运行 within the iframe which keeps the url the same.
我发现了一段代码,当它被按下时,它会将你带到 iframe 之外的网站,但是为了我的目的,它需要是自动的。
整个页面代码是:
<!DOCTYPE html>
<html>
<a target="_parent" href="http://www.MyWebsite/Contact_Us.com">Click Here</a>
</html>
这行得通,但我不希望用户必须按下它。有什么简单的方法可以让这个 运行 在页面打开时自动生成吗?
提前致谢
这对我有用。将其放入加载到您的 iframe 的页面中。
<body onload="parent.location='http://www.MyWebsite/Contact_Us.com'">
I have a website 运行ning inside an iframe but when links are selected they 运行 within the iframe which keeps the url the same.
我发现了一段代码,当它被按下时,它会将你带到 iframe 之外的网站,但是为了我的目的,它需要是自动的。
整个页面代码是:
<!DOCTYPE html>
<html>
<a target="_parent" href="http://www.MyWebsite/Contact_Us.com">Click Here</a>
</html>
这行得通,但我不希望用户必须按下它。有什么简单的方法可以让这个 运行 在页面打开时自动生成吗?
提前致谢
这对我有用。将其放入加载到您的 iframe 的页面中。
<body onload="parent.location='http://www.MyWebsite/Contact_Us.com'">