语法设置: function test(){ var width=screen.width; var height = screen.height; alert("width : "+width) ; alert("height : "+height) ; }