window.open如何实现窗口最前
目前有个功能需求:在页面A中有链接点击用window.open打开一个弹窗页面B,页面B没有关闭,然后返回A页面再次点击那个链接,页面B的内容已经更新,但是不能自动回到最前,请问如何实现??
也即是window.open打开的窗口当失去焦点时,再次点击如何让窗口保持最前?
下面是弹窗代码:
function openMaterialPage(warehouse, vendor, cinvCodeType) {
var iTop = (window.screen.height - 30 - 700) / 2; //获得窗口的垂直位置;
var iLeft = (window.screen.width - 10 - 1250) / 2; //获得窗口的水平位置;
window.open("ERP_Inventory_Rawest.aspx?SourceType=vendor&WareHouse=" + warehouse + "&Vendor=" + vendor + "&cinvCodeType=" + cinvCodeType, "material11", "height=700px,width=1250px,top=" + iTop + ",left=" + iLeft + ",toolbar=no,menubar=no,scrollbars=yes, resizable=yes,location=no, status=no");
}