하이퍼 링크의 클릭 이벤트로 팝업을 엽니 다. 팝업에는 서버의 레코드가 포함되어 있습니다.jquery/jscript 여러 개의 팝업 열기 방지
신속하게을 클릭하면 한 번에 여러 개의 팝업이 나타나는 문제가 있습니다. 이것을 방지하는 방법이 있습니까?
$('.wrapper_form a.add').click(function(e)
{
e.preventDefault();
if(typeof(currentPopup) == 'undefined' || currentPopup.closed)
{
url = 'server_page.aspx';
currentPopup = window.open(url,'server','height=500,width=800');
if (window.focus) {currentPopup.focus()}
}
else
{
currentPopup.focus();
}
});
팝업은 한 번만 실행하면됩니까? 한 페이지 당 한 번로드? –
팝업의 단일 인스턴스를 열어야합니다 – csotelo