2013年5月30日

Firefox20 到 Firefox21 的一个小改变

摘要: <div style="width:500px;position:relative;border:1px solid black;" onclick="alert([this.scrollHeight,this.offsetHeight]);"> <div style="float:left;width:200px;height:200px;border:3px"> click me </div> </div>Firefox20-: 0,2Firefox21+: 200,2其它浏览器:2 阅读全文

posted @ 2013-05-30 21:56 JKisJK 阅读(1074) 评论(0) 推荐(0) 编辑

修改document.domain的注意事项

摘要: 有时候,需要修改document.domain。 典型的情形:http://a.xxx.com/A.htm 的主页面有一个<iframe src="http://b.xxx.com/B.htm"></iframe>,两个页面的js如何进行交互? 实现跨域交互的方式有很多,其中这种跨子域的交互,最简单方式就是通过设置document.domain:只需要在A.htm与B.htm里都加上这一句document.domain = 'xxx.com',两个页面就有了互信的基础,而能无碍的交互。 示例:http://www.wagang.net 阅读全文

posted @ 2013-05-30 20:50 JKisJK 阅读(39740) 评论(8) 推荐(1) 编辑

导航