screen.width : 브라우저가 출력될 출력장치(모니터)의 폭을 저장한 프로퍼티
//alert(screen);// 출력 [object Screen] var width=screen.width; alert("width = "+width);//width = 예시 1920screen.height : 브라우저가 출력될 출력장치(모니터)의 높이를 저장한 프로퍼티
var height=screen.height; alert("height = "+height);//height = 예시 1080자식 브라우저를 생성하여 변수에 저장
var win=window.open("", "","width=400,height=300,top=100,left=400"); alert(win);//[object Window]Window.moveTo(x, y) : 브라우저의 출력좌표를 변경하는 메소드 - 출력위치 이동
win.moveTo(0,0)Window.resizeTo(width, height) : 브라우저의 폭과 높이를 변경하는 메소드 - 크기 변경
win.resizeTo(width,height);Window.moveBy,Window.resizeBy
var intervalId=setInterval(function() { // 0.5초마다 함수 반복 실행 //Window.moveBy(x, y) : 브라우저의 현재 위치를 기준으로 출력좌표를 변경하는 메소드 - 출력위치 이동 win.moveBy(50,50); //Window.resizeBy(width, height) : 브라우저의 현재 크기를 기준으로 폭과 높이를 변경하는 메소드 - 크기 변경 win.resizeBy(-100,-100); }, 500);5초후에 실행된 함수 종료
setTimeout(function() { clearInterval(intervalId); }, 5000);