window.frames["photo_roolup"].location.href = "aa.asp";  //不可跨域

解决方案 »

  1.   

    document.getElementById("photo_roolup").location.href
      

  2.   

    <body>
    <IFRAME id="photo_roolup" name="photo_roolup" marginWidth=0 marginHeight=0 src="1.htm" frameBorder=0 width="255" scrolling=no height=205>载入中...</IFRAME>
    </body>
    <script>
    document.getElementById('photo_roolup').src='http://www.csdn.net';
    </script>
      

  3.   

    我的和楼上你写的是一样的啊,单独出来行的,为什么放到我的asp里就是找不到对象呢?id冲突?
      

  4.   

    function chg_rolPic(obj){
     for (i=1;i<=9;i++){
      obj_t=document.getElementById(i).style;
      obj_t.backgroundColor="#f5f5f5";
      obj_t.borderRightWidth="1px";
      obj_t.color="#a0a0a0";
     }
     obj.style.color="#1479A7";
     obj.style.backgroundColor="#FFFFFF";
     obj.style.borderRightWidth="0px";
     document.getElementById('photo_roolup').src="_roolup.asp?iClassNo="+obj.id;
    }      <tr>
            <td align="center" class="btn2" id="4" onClick="chg_rolPic(this)" onMouseOver="chg_btnOver(this)" onMouseOut="chg_btnOut(this)" style="color:#a0a0a0">厨&nbsp;房</td>
          </tr><IFRAME id="photo_roolup" name="photo_roolup" marginWidth=0 marginHeight=0 src="_roolup.asp?iClassNo=0" frameBorder=0 width="255" scrolling=no height=205>载入中...</IFRAME></td>看相关的都列出来了,就是找不到对象