摘要:
常常用到iframe内嵌另一个页面,而这个页面里显示图片,当点击这个内嵌页面中的图片,让他在父级页面显示colorbox的效果1.首先iframe内页面额代码js: function colorBox() { var url = document.getElementById("bigPic").src; window.parent.showBigPic(url); }html:<img id="bigPic" src="<%=BigPic %>" ondblclick="colorBox()" 阅读全文
摘要:
在ie中使用window.frames["Iframe1"].document.location="";无任何问题,可在谷歌中出现location未定义错误其真正原因还在浏览器的内核不一样,参照:http://blog.csdn.net/lzy_1515/article/details/6045629所以将iframe的id和name设成一样的即可<iframe frameborder="0" id="Iframe1" name="Iframe1" scrolling="yes& 阅读全文