티스토리 뷰
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
//html 자체에서 자바스크립트로 넘겨줄수있고
function check(f, s) { // f = update/delete // s = myform
if (f == 'update') {
s.action = "09Dom.html";
s.method = "POST";
} else {
s.action = "08Screen.html";
s.method = "GET";
}
}
</script>
</head>
<body>
<form name="myForm">
아이디<input type="text" name="userid"><br> 비밀번호<input
type="text" name="passwd"><br> <input type="submit" value="회원가입">
<button onclick="check('update', myForm)">수정</button>
<button onclick="check('delete', myForm)">삭제</button>
</form>
</body>
</html>
----- 09Dom.html --
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body><div>Hello</div>
<script type="text/javascript">
var xx = document.body;
var d = xx.firstChild;
console.log(xx);
console.log(d);
var h=d.firstChild;
console.log(h);
</script>
</body>
</html>
----------- 08Screen.html"
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
console.log(screen.width);
console.log(screen.height);
console.log(screen.availWidth);
console.log(screen.availHeight);
</script>
</head>
<body>
</body>
</html>
'It' 카테고리의 다른 글
오라클 SQL함수 (0) | 2023.02.26 |
---|---|
오라클 그룹함수 (0) | 2023.02.26 |
javascript 아이디체크 입력값 체크 (0) | 2023.02.24 |
function alert (0) | 2023.02.23 |
컴퓨터 바이러스(Computer Virus) (0) | 2023.02.22 |