如何防止自己的網站被別人以 iframe 蓋台嵌入 (iframe反制辦法)
如何防止自己的網站被別人以 iframe 蓋台嵌入 (iframe反制辦法)
資料來源: http://www.vixual.net/blog/archives/36
方法01:
<script type="text/javascript"> if( top.location != document.location ){ top.location.href = document.location.href; } </script>
方法02:
<script type="text/javascript"> if( top.location != document.location ){ document.write("<h1 style='color:#FF0000'>未經授權嵌入別人的網頁是可恥的行為!!</h1>(<a href='"+document.location+"' target='_blank'>原站網址</a>)"); } </script>