Jsp - 페이지 이동

2020. 6. 16. 10:49Jsp

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
 
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
//    웹브라우저 내장객체
//    window(창) - location(주소줄)
//                    - history(방문기록)
//                    - document(html문서) ->image,link,layer...
//                                                                - form(로그인창)->text,password,textarea
//                                                                -checkbox, radio
//                                                                -select - option
//window.history.변수                    history.length 방문기록개수
//window.history.함수()                history.back() 뒤로이동
//                                                         history.forward() 앞으로이동
//                                                             history.go(-1) 한칸 뒤로이동
//                                                             history.go(1) 한칸 앞으로이동
function fun1() {
    alert(history.length);
}
function fun2() {
    alert("뒤로이동");
    history.back();
}
function fun3() {
    history.forward();
}
</script>
</head>
<body>
<h1>js2/test3.html</h1>
<input type="button" value="방문기록개수" onclick="fun1()">
<input type="button" value="뒤로이동" onclick="fun2()">
<input type="button" value="앞으로이동" onclick="fun3()">
 
</body>
</html>
cs

 

 

새창으로 열어서 그런지 뒤로 이동과 앞으로 이동은 안되었지만 성공!!

'Jsp' 카테고리의 다른 글

Jsp - 이미지 제어  (0) 2020.06.16
Jsp - 화면 색 변경  (0) 2020.06.16
Jsp - 주소확인  (0) 2020.06.16
Jsp - 창열기,닫기  (0) 2020.06.16
Jsp - 화면4  (0) 2020.06.16