IT/jQuery
jQuery 부모창 제어/접근(opener, parent)
럽티
2016. 1. 11. 15:41
jQuery 자식 팝업 창에서 부모창 컨트롤
1 | $(opener.document).find( "#Form" ).attr( "action" , "index.do" ).submit(); |
자식창 -> 부모창으로 값 전달하기
1 | -opener.document.getElementById( "id" ).value= "value" ; |
2 | $( "#id" ,opener.document).val( "value" ); |
3 | $( "input[name=imgFile]" , parent.document.body).val() |
4 | $(opener.document).find( "#id" ).val( "value" ); |
6 | - opener.location.href= "javascript:fun();" ; |
7 | $(opener.location).attr( "href" , "javascript:fun();" ); |
출처 : http://jp1020.tistory.com/