JavaScript & jQuery | jquery 해당 클래스안에서 iframe name찾기, iframe과 iframe간 제어 | |||||
---|---|---|---|---|---|
작성자 | 작성일 | 18-03-09 18:31 | |||
<div class="product01_0602"> <iframe name="test11" src="test1.php"> </iframe> </div> <div class="product01_0603"> <iframe name="test22" src="test2.php"> </iframe> </div> 위와 같이 test2.php에서 test1.php안의 id가 cover_no에서 값을 제어하고자 할때 iframe의 name가 고정되었다면 크게 문제가 되지 않겠지만... 랜덤으로 생성될때 iframe의 이름을 찾아야 할때 $('.product01_0602', parent.document).find("iframe").attr("name"); 그리고 test2.php에서 test1.php의 cover_no값을 변경하려면 $("#cover_no", parent.frames[$('.product01_0602', parent.document).find("iframe").attr("name")].document).val("test"); |
|||||
|
댓글목록
등록된 댓글이 없습니다.