现在情况是,主页有:
<frameset rows="100,*">
<frame src="a.html" name="topFrame" target="main" />
<frame src="b.html" name="main" target="_self" />
</frameset>
在a.html里写js可以移除已设置的事件处理函数
$('.openlogin').off()
而在主页里写$('.openlogin',topFrame.document).off
却无作用,但该选择器可以正确选择到topFrame里的元素,也可以使用text()方法改变内容
p.s. 测试使用jQuery1.10.2
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。