본문 바로가기

Local Oriented/HTML CSS JS

window.open 팝업이 열릴 때 맨 위에 뜨게 하려면 focus()

var wo = window.open('...','...','...');

if(wo) wo.focus();

else alert('팝업 차단 기능을 해지해 주세요. ^.^');