✔️ setTimeout(function, milliseconds, parameter1, parameter2, ...);
첫번째 인자로 실행할 코드를 담고 있는 함수를 받고, 두번째 인자로 지연 시간을 밀리초(ms) 단위로 받는다.
<script>
setTimeout(function() {
window.location.href = "http://localhost:8080/StudentList/main.jsp?page=studentList";
}, 2000); // 2초를 밀리초로 변환하여 설정
</script>