Java代码 int width = 0 ; int height = 0 ; width = Toolkit.getDefaultToolkit().getScreenSize().width ; height = Toolkit.getDefaultToolkit().getScreenSize().height ;
Js代码 var Width = window.screen.availWidth; var Height = window.screen.availHeight;