2011-08-24 11 views
0

aspx 페이지에서 iFrame ("fraContent"라고 함)을 사용하는 asp.net 웹 앱이 있습니다. iFrame에는 "카운터"값을 저장하는 숨겨진 필드 ("hdnCounter"라고 함)가 있습니다.asp.net의 iFrame에서 값 가져 오기

부모 aspx 페이지에서 어떻게 iFrame에서 숨겨진 값에 액세스 할 수 있습니까?

alert(document.getElementById('window.fraContent.hdnCounter').value);

는 요소의 ID 그렇게 getElementById이 작동하지 않습니다, window.fraContent.hdnCounter하지

답변

2

을 작동하지 않습니다.

간단히 말하면 다음과 같습니다. alert(window.fraContent.document.getElementById('hdnCounter').value)