티스토리 뷰

<!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
"이 포스팅은 쿠팡 파트너스 활동의 일환으로, 이에 따른 일정액의 수수료를 제공받습니다."
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2025/04   »
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
글 보관함