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");
            }

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM