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