jQuery에서 부모창 제어/접근(opener, parent)

솔루션 구매 및 의뢰 문의
010-7262-9288
mrkjm@nate.com
JS/Jquery/Ajax 팁

jQuery에서 부모창 제어/접근(opener, parent)

머니버그 0 1027

1. jQuery 자식 팝업 창에서 부모창 컨트롤

1
$(opener.document).find("#Form").attr("action","index.php").submit();
cs

2. 자식창 -> 부모창으로 값 전달하기

1
2
3
4
5
6
7
8
9
opener.document.getElementById("id").value="value"//dom 객체로 제어
 
$("#id",opener.document).val("value"); // jQuery 방식 1
 
$("input[name=imgFile]"parent.document.body).val() // 방식 2
 
$(opener.document).find("#id").val("value"); //방식 3
 
opener.location.href="javascript:fun();"//일반적인 방법
cs

 

, , , , , , , , ,

0 Comments
제목