Removing HTML frames

别说谁变了你拦得住时间么 提交于 2020-01-03 02:41:09

问题


I have a website which splits the screen into two frames; the top half is the name of my website; the bottom half is an advertised website.

I want it so if the user clicks the link on the top half (my website) the user is taken to my homepage.

This works, but my website is loaded into the top half and not the whole screen.

How do I get the link to remove the frames and display my website in the whole browser.

Here's what I'm talking about:

http://www.thefacebookies.com/advertise.php

Have tried target="_top" which doesn't work.

Many thanks.


回答1:


You have:

<a onClick="window.location ='bet.php'" target="_top">

That should be:

<a href="bet.php" target="_top">
  • Don't use JavaScript when HTML will do.
  • The target attribute doesn't influence assignments to window.location



回答2:


<A HREF="http://www.xyz.com" TARGET="_top">

"_top" loads the linked document in the topmost frame, that is, the new page fills the entire window.

See

target Property

From javascript you can

parent.location = new location;


来源:https://stackoverflow.com/questions/1470651/removing-html-frames

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