17.12.15 웹3일차
자바스크립트 이벤트 처리
이벤트란
====== 버튼 처리 문법
<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
</head>
<body>
<input type=button value=pop id=popBtn>
<script type="text/javascript">
document.getElementById("popBtn").onclick = function(){
alert("pop");
}
</script>
</body>
</html>
====== 페이지 이동문법
<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
</head>
<body>
<input type=button value=pop id=popBtn>
<script type="text/javascript">
document.getElementById("popBtn").onclick = function(){
location.href = "http://www.naver.com"; //페이지 이동문법
}
</script>
</body>
</html>
========= 버튼 클릭 후 페이지 팝업 사이즈 지정
<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
</head>
<body>
<input type=button value=pop id=popBtn>
<script type="text/javascript">
document.getElementById("popBtn").onclick = function(){
window.open("http://www.naver.com","","width=500,heigt=500");
}
</script>
</body>
</html>
======
<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
</head>
<body>
<script type="text/javascript">
window.onload = function(){
window.open("http://www.google.com","","width=500,height=500");
}
</script>
</body>
</html>
=====
<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
</head>
<body>
<script type="text/javascript">
window.onunload = function(){
for(var i = 0;i<5;i++){
window.open("http://www.google.com","","width=500,height=500");
}
}
</script>
</body>
</html>
=======
========================== jsp 시작
jsp
서블릿은 문서를 요청받으면 바로 만들어서 보냄
'JAVA 개발 공부 정보' 카테고리의 다른 글
[개발교육] 자바 jsp 기초 - 8(output.jsp) (0) | 2018.01.15 |
---|---|
[개발교육] 자바 jsp 기초 - 8(InputHtml) (0) | 2018.01.15 |
[개발교육] 자바 jsp 기초 - 6(팝업 윈도우창 연결 및 수정) (1) | 2018.01.15 |
[개발교육] 자바 jsp 기초 - 5(인라인스크립트, 링크 합계 팝업) (0) | 2018.01.15 |
[개발교육] 자바 jsp 기초 - 4(합계구하기) (0) | 2018.01.15 |