在网页中引用了别人的天气预报,但是有超连接,现在想屏蔽连接。用层有个问题,层要绝对定位,可我的是把天气放在表格中的,整个页面是用%分配宽度的,所以算不出left与top的位置,因而看看有没有其他的方法

解决方案 »

  1.   

    用js将该iframe里的<a>...</a>替换成...
    或者将里面的a的href属性==>#
      

  2.   

    jQuery code
    $(function(){
      $("#yourframe a").attr("href","#"); 
    });
      

  3.   

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns=" http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text ml; charset=utf-8" />
    <title>Untitled Document</title>
    <script type="text/javascript" src="jquery.js"></script><script type="text/javascript">
    $(function(){
      $("#test a").attr("href","#");  
    });
    </script></head>
    <body>
    <iframe id="test" name="weather_inc" src="http://tianqi.xixik.com/cframe/10" width="300" height="22" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" ></iframe>
    </body>
    </html>应用上了,也有jquery.js 了,可就是不能工作,还是有连接
      

  4.   

    你 iframe别的网页  怎么可以用 jq 层级访问呢   跨域操作不行的吧