force iframe or disable javascript
I have a situation where I have to load a page in a frame. This page is not mine, so I cannot edit its code. I want it to load inside the iframe, but it overtakes the 开发者_如何转开发browser tab. When I took a look at the source, i found a function that does:
top.location.href = window.location.href;
Is there a way I can block a call to just this function, or if I somehow I can force this page to stay inside the frame. Thanks for the help!
in your main file put
top = new Object();
top.location = new Object();
top.location.href = function(){
alert('its calling me');
}
精彩评论