1
下面的代碼給出了打開彈出窗口,它會打開,但我想專注於彈出窗口。我試圖scriptTag.focus(),但它不會有人提供建議來解決這個問題。如何聚焦彈出窗口?
var scriptTag = "window.open('"+serverURL+"','popUpWindow','height=500,width=400,left=100,top=100,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no, status=yes')";
scriptTag.foucs();
refButton = '<div class="tableAction" id="senDiv">' +
'<input id="importSce" name="importSce" type="button" value="Import" onclick="'+scriptTag+'"/>' +
'</div>';