我在自己的网页插入iframe,在Chrome和其它浏览器下没有问题,可是在火狐3.6、4.0都会出现自动跳转到iframe网址的问题。
补充一下代码:
in the frame.
onload="if (parent != window) {window.top.location='http://sosoplus.com/s.php?cxx3d014792025214321162110:ugpjhluozbgx26cofx3dFORID:10x26iex3dUTF-8x26newwindowx3d1x26qx3dXinongdax 26tyx3dgnx26opx3dx26filterx3d0x26hlx3dzh-CN#' document.body .offsetHeight;}"
in the frame.
onload="if (parent != window) {window.top.location='http://sosoplus.com/s.php?cxx3d014792025214321162110:ugpjhluozbgx26cofx3dFORID:10x26iex3dUTF-8x26newwindowx3d1x26qx3d西%E…… You can try it
This cannot be removed.
is in the loaded inline frame.
The strange thing is that there is no such thing in chrome's body-onload.
Quoting the reply from konghulu on the 2nd floor:
onload="if (parent != window). ) {window.top.location='http://sosoplus.com/s.php?cxx3d014792025214321162110:ugpjhluozbgx26cofx3dFORID:10x26iex3dUTF-8x26newwindow...
This is also a way. However, other people’s web pages won’t let you add code casually. People don’t go there just to prevent being iframed. www.sosoplus.com uses Google's search. It should be said that the code in Google's custom search has been transferred. But it won't jump in chrome. This is not bad.
in the frame.
onload="if (parent != window) {window.top.location='http://sosoplus.com/s.php?cxx3d014792025214321162110:ugpjhluozbgx26cofx3dFORID:10x26iex3dUTF-8x26newwindowx3d1x26qx3d西%E……
使用JQuery$(function(){$("iframe").attr("src", "你的网址")})
By the way. After testing this problem, the domain you referenced is not your own, so it is hard to say. You can try using baidu as your target. I have also tested it. The same code will be squeezed out.
top.location = self.location
Maybe someone has this method