Today to do a small software encountered a problem, that is, in a page need to put an IFRAME frame to preview the site, but the site is previewed with a lot of JS script, such as pop-up window, hint box, the most hateful is always let set as the home page and to join the collection, I think there should be a way to prohibit the script in the IFRAME, so Baidu a bit, but also found a lot of new continents, so solve this problem, recorded, convenient later inquiries, but also convenient for everyone to refer to:
<iframe src= "fillseo.html" ></iframe>
Fillseo.html there is a JS script, which has alert, and pop-up windows, very hateful bar, how to prohibit them?
And this fillseo.html is a different domain file.
After looking at countless relevant data, found the following code, can completely solve this problem:
Program code One:
<noscript><iframe src=fillseo.html></iframe></noscript>
Or
Program code Two:
<iframe src= "fillseo.htm" width= "height=" id= "Pcyear" ></iframe>
<script>
var fillseo_window=window.frames["Pcyear"];
Fillseo_window.window.alert=function () {
alert ("Pinball!)" ");
Also can write you want to write Dongdong
};
</script>