openDevDetail : function (dev_id){
let url = `/resourceManage/device_view.html?dev_id=${dev_id}`; //转向网页的地址;
let name = "设备详情";
let iHeight = 900; //值越大,弹窗的高度越大
let iWidth =1400;//值越大,弹窗的宽度越大
let iTop = (window.screen.height-30-iHeight)/2; //获得窗口的垂直位置;
let iLeft = (window.screen.width-10-iWidth)/2; //获得窗口的水平位置;
window.open(url,name,'height='+iHeight+',,innerHeight='+iHeight+',width='+iWidth+',innerWidth='+iWidth+',top='+iTop+',left='+iLeft+',toolbar=no,menubar=no,scrollbars=auto,resizeable=no,location=no,status=no');
},
js居中弹窗 window.open()
最新推荐文章于 2022-02-11 14:42:40 发布