當我調用window.open
時,會刷新父窗口。我還沒有看到如何防止這種情況發生。任何幫助,將不勝感激。防止刷新父窗口中的window.open
left = Number((screen.width/2)-(730/2)),
top = Number((screen.height/2)-(450/2));
var windowFeatures = 'location=0,menubar=0,resizable=0,scrollbars=0,status=0,width=700,height=500,top='+top+',left='+left;
window.open('access-modal.html', '', windowFeatures);
win.moveTo(left, top);
你是怎麼稱呼它的?您可能不會阻止默認操作。什麼是勝利? – epascarello 2013-04-04 18:53:42
你確定你沒有把報價搞亂,因爲它不應該在window.open上刷新父項。 – adeneo 2013-04-04 18:53:46
你缺少'window.open('access-modal.html','',windowFeatures)中的引號;' – 2013-04-04 18:55:50