Javascript 仅限特定站点的帧断路器?

Javascript 仅限特定站点的帧断路器?,javascript,frame,Javascript,Frame,我将此用于反帧: <script language="JavaScript" type="text/javascript"> if (top.location != self.location) top.location = self.location; 如果(top.location!=self.location)top.location=self.location; 我怎样才能避免对来自雅虎图片搜索的访问者进行断帧?他们有推荐人: 只需匹配并采取适当的措施即可 if (d

我将此用于反帧:

<script language="JavaScript" type="text/javascript">
if (top.location != self.location) top.location = self.location;

如果(top.location!=self.location)top.location=self.location;

我怎样才能避免对来自雅虎图片搜索的访问者进行断帧?他们有推荐人:

只需匹配并采取适当的措施即可

if (document.referrer.indexOf('images.search.yahoo.com') === -1) {
    //break frame
}