============================================iframe
<iframe name= "A" src= "a.aspx" width= "300px" height= "200px" ></iframe><iframe name= "B" src= "b.aspx" Width= "300px" height= "200px" ></iframe>
------------1, main frame operation a
$ (window.frames["a"].document). Find (". Adiv"). Text ("SDSD");
------------2,a Operation Master
$ (". Class1", window.parent.document). Text ("asdafasf");
Or
$ (window.parent.document). Find (". Class1"). Text ("asdafasf");
Or
$ (self.parent.document). Find (". Class1"). Text ("asdafasf");
------------3,a Operation b
$ (". Bdiv", self.parent.frames["B"].document). Text ("Asdas");
Or
$ (window.parent.frames["B"].document). Find (". Bdiv"). Text ("asdafasf");
============================================frameset
<frameset rows= "100,*" cols= "*" frameborder= "no" border= "0" framespacing= "0" > <frame src= "top.html" Name= " Topframe "scrolling=" No "noresize=" noresize "id=" Topframe "title=" Topframe "/> <frameset cols=" 200,* " Frameborder= "No" border= "0" framespacing= "0" > <frame src= "left.html" name= "Leftframe" scrolling= "no" noresize= " Noresize "id=" Leftframe "title=" Leftframe "/> <frame src=" main.html "name=" MainFrame "id=" MainFrame "title=" main Frame "/> </frameset></frameset><noframes><body></body></noframes>
------------left Operation top
$ (window.parent.frames["Topframe"].document). Find (". Topdiv"). Text ("SAFSA");
Note: Name should be strictly based on the default name generated by the framework, otherwise you will eat a big loss
This article is from the "Program Ape's Home" blog, please be sure to keep this source http://962410314.blog.51cto.com/7563109/1432721