1.在父視窗中操作子視窗中的元素,如(其中 iframe1是iframe的id)
1) 選中iframe中的所有單選鈕
$(window.frames["iframe1"].document).find("input[@type='radio']").attr("checked","true");
2).去掉子視窗中類名為top_menu元素的css屬性類on
$(window.frames["iframe1"].document).find('.top_menu').removeclass("on");
2.在iframe中操作父視窗的元素
1) 選中父視窗中的所有單選鈕
$(window.parent.document).find("input[@type='radio']").attr("checked","true");
2父視窗元素id為_m1408加上css類on
$(window.parent.document).find("#_m1408").addclass("on");
iframe框架的:
好像也可以用$("#myid", top.document);
父窗體呼叫iframe中的方法(right)為ifram的id
document.frames["right"].expand();
父窗體:parent;
子窗體:opener;(window.opener.reload();)
$(window.parent.document).find("#alimamaifrm").attr("src","
");
用委託來實現子窗體操作父窗體中的控制項
實現 form1中,乙個lable1 在form2中控制form1中的lable1的顯示或隱藏 form1 private void button1 click object sender,eventargs e private void setvisiable private void setvi...
窗體操作 GetWindowLong
函式原型 long getwindowlong hwnd hwnd,int nindex 引數 hwnd 指定視窗的控制代碼 nindex 需要獲得的資訊的型別 值 功能 nindex取值如下 gwl exstyle 得到擴充套件的視窗風格 gwl style 得到視窗風格 gwl wndproc ...
C 子窗體重新整理父窗體
子窗體 from2 重新整理父窗體 from1 父窗體中有重新整理方法 refersh 1.所有權法 from1中 form2 f2 new form2 f2.owner this f2.show form2中 form1 f1 form1 this.owner f1.refersh 2.自身傳遞法...