js控制弹出新页面窗口位置和大小的方法

在js中添加如下代码:

window.open("https://www.w3school.com.cn/index.html","","top=100,left=100,width=300,height=200");

window.open("toExport.do?id="+id+"&date="+date,"","top=100,left=100,width=300,height=200");
toExport 是action方法名,id和date是传到后台action方法的接收值,后面 top···是控制窗口大小,自己可以根据需求自行更改


自用
function toExport(id,scheduleDate){
                disableAllBts();
                window.open("toExport.do?scheduleID="+id+"&scheduleDate="+scheduleDate,"","top=100,left=100,width=300,height=200");
            }

 

posted @ 2020-08-11 14:08  小二柯  阅读(1090)  评论(0编辑  收藏  举报