1
JavaScript를 사용하여 비디오를 팝업하고, iframe에있을 때를 알아야 필요에 따라 비디오의 크기를 조정할 수 있습니다.iframe의 if/else 문 JavaScript if/
iframe이 밖에, 나는 세 가지 경고를 볼 때 ('이 모두 볼 수있다', '이 사실은 이후'하지 iframe에 '등)
때 iframe을에, 난 그냥 참조 첫번째 경고 ('이것은 양쪽 모두에 의해 보여진다').
var handleViewVideoClick = function (dataAction, eventType, targetElement, dataActionElement) {
alert('this is seen by both');
if ($('iframe', window.parent.document).length == 0) {
alert('not in iframe');
} else {
alert('in iframe');
}
alert('this is after the fact...');
};
여기에 어떤 현상이 발생합니까?
감사합니다, 위대한 작품! – gr33nh4t
@ gr33nh4t - 오신 것을 환영합니다. 그리고 오신 것을 환영합니다! –