2014-03-13 1 views
0
<a href="//source of iframe name blah//" target="about:blank">open in new window</a> 

<a href="1.html" target="blah">link 1</a> 
<a href="2.html" target="blah">link 2</a> 
<a href="3.html" target="blah">link 3</a> 

<iframe name="blah" src="blah.html" ></iframe> 

iframe이있는 페이지가 있습니다. iframe 내부에 열린 페이지가있는 링크가있어서 iframe에 하나의 상수 소스가 없습니다. 나는 ifhtml, 2.html, 또는 3.html이든간에 새로운 윈도우로 현재 iframe에있는 소스를 열어 줄 링크가 있기를 원한다. (더 많은 페이지가 지속적으로 추가되어 ' 미래에는 세 가지가 될 것입니다.)iframe 소스를 새 창으로 여는 iframe 외부 링크를 여는 방법은 무엇입니까?

어떻게이 링크를 구현합니까? 미리 감사드립니다. : ~)

답변

0

이 시도

$(function(){ 
    $('a[target="blah"]').on('click',function(e){ 
     e.preventDefault(); 
     window.open(this.href,'blah'); 
    }); 
}); 
관련 문제