Notice
Recent Posts
Recent Comments
ยซ   2024/12   ยป
์ผ ์›” ํ™” ์ˆ˜ ๋ชฉ ๊ธˆ ํ† 
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
Archives
Today
In Total
๊ด€๋ฆฌ ๋ฉ”๋‰ด

A Joyful AI Research Journey๐ŸŒณ๐Ÿ˜Š

[17] 230119 Ch. 10 ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ DOM๊ณผ ์ด๋ฒคํŠธ ์ฒ˜๋ฆฌ, ์ž…๋ ฅ ๊ฒ€์ฆ: 4. DOM ๋…ธ๋“œ ์‚ญ์ œ์™€ ์ถ”๊ฐ€, 5. ๋ธŒ๋ผ์šฐ์ € ๊ฐ์ฒด ๋ชจ๋ธ, 6. ์ด๋ฒคํŠธ ์ฒ˜๋ฆฌ [K-๋””์ง€ํ„ธ ํŠธ๋ ˆ์ด๋‹ 17์ผ] ๋ณธ๋ฌธ

๐ŸŒณBootcamp Revision 2023โœจ/JavaScript, jQuery, Ajax, JSON

[17] 230119 Ch. 10 ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ DOM๊ณผ ์ด๋ฒคํŠธ ์ฒ˜๋ฆฌ, ์ž…๋ ฅ ๊ฒ€์ฆ: 4. DOM ๋…ธ๋“œ ์‚ญ์ œ์™€ ์ถ”๊ฐ€, 5. ๋ธŒ๋ผ์šฐ์ € ๊ฐ์ฒด ๋ชจ๋ธ, 6. ์ด๋ฒคํŠธ ์ฒ˜๋ฆฌ [K-๋””์ง€ํ„ธ ํŠธ๋ ˆ์ด๋‹ 17์ผ]

yjyuwisely 2023. 1. 19. 12:50

230119 Thu 17th class

Ch. 10 DOM๊ณผ ์ด๋ฒคํŠธ ์ฒ˜๋ฆฌ, ์ž…๋ ฅ ๊ฒ€์ฆ
์ง„๋„: p. 388 ~ (๊ต์žฌ: HTML5 + CSS3 + JavaScript๋กœ ๋ฐฐ์šฐ๋Š” ์›นํ”„๋กœ๊ทธ๋ž˜๋ฐ ๊ธฐ์ดˆ, ์ €์ž: ์ฒœ์ธ๊ตญ)

 

HTML5+CSS3+JavaScript๋กœ ๋ฐฐ์šฐ๋Š” ์›นํ”„๋กœ๊ทธ๋ž˜๋ฐ ๊ธฐ์ดˆ | ์ฒœ์ธ๊ตญ - ๊ต๋ณด๋ฌธ๊ณ 

HTML5+CSS3+JavaScript๋กœ ๋ฐฐ์šฐ๋Š” ์›นํ”„๋กœ๊ทธ๋ž˜๋ฐ ๊ธฐ์ดˆ | ์›นํ”„๋กœ๊ทธ๋ž˜๋ฐ ์ดˆ๋ณด์ž๋„ ์‰ฝ๊ฒŒ ๋ฐฐ์šฐ๋Š” ์›น ๊ฐœ๋ฐœ ์ง€์นจ์„œ!์ด ์ฑ…์€ ์›นํ”„๋กœ๊ทธ๋ž˜๋ฐ์„ ์ฒ˜์Œ ๋ฐฐ์šฐ๋Š” ์ดˆ๋ณด์ž๋“ค์„ ์œ„ํ•ด ๊ธฐ์ดˆ๋ถ€ํ„ฐ ์ฐจ๊ทผ์ฐจ๊ทผ ์„ค๋ช…ํ•œ๋‹ค. 1~3์žฅ์—

product.kyobobook.co.kr


์˜ค๋Š˜ ๋ฐฐ์šด ๊ฒƒ ์ค‘ ๊ธฐ์–ตํ•  ๊ฒƒ์„ ์ •๋ฆฌํ–ˆ๋‹ค.


์ง€๋‚œ ์ˆ˜์—… ๋•Œ ๋ฐฐ์šด ๊ฒƒ ์ค‘ ๋‹ค์‹œ ๊ธฐ์–ตํ•  ๊ฒƒ

The document object represents your web page.
If you want to access any element in an HTML page, you always start with accessing the document object.

HTML ์š”์†Œ์˜ ์„ ํƒ
HTML ์š”์†Œ๋ฅผ ์„ ํƒํ•˜๊ธฐ ์œ„ํ•ด ์ œ๊ณต๋˜๋Š” ๋ฉ”์„œ๋“œ๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™๋‹ค.

๋ฉ”์„œ๋“œ ์„ค๋ช…
document.getElementsByTagName(ํƒœ๊ทธ์ด๋ฆ„) ํ•ด๋‹น ํƒœ๊ทธ ์ด๋ฆ„์˜ ์š”์†Œ๋ฅผ ๋ชจ๋‘ ์„ ํƒํ•œ๋‹ค.
document.getElementById(์•„์ด๋””) ํ•ด๋‹น ์•„์ด๋””์˜ ์š”์†Œ๋ฅผ ์„ ํƒํ•œ๋‹ค.
document.getElementsByClassName(ํด๋ž˜์Šค์ด๋ฆ„) ํ•ด๋‹น ํด๋ž˜์Šค์— ์†ํ•œ ์š”์†Œ๋ฅผ ๋ชจ๋‘ ์„ ํƒํ•œ๋‹ค.
document.getElementsByName(name์†์„ฑ๊ฐ’) ํ•ด๋‹น name ์†์„ฑ๊ฐ’์„ ๊ฐ€์ง€๋Š” ์š”์†Œ๋ฅผ ๋ชจ๋‘ ์„ ํƒํ•œ๋‹ค.
document.querySelectorAll(์„ ํƒ์ž) ํ•ด๋‹น ์„ ํƒ์ž๋กœ ์„ ํƒ๋˜๋Š” ์š”์†Œ๋ฅผ ๋ชจ๋‘ ์„ ํƒํ•œ๋‹ค.

 


prompt() ํ•จ์ˆ˜

์‚ฌ์šฉ์ž์—๊ฒŒ ์–ด๋–ค ์‚ฌํ•ญ์„ ์•Œ๋ ค์ฃผ๊ณ  ์‚ฌ์šฉ์ž๊ฐ€ ๋‹ต๋ณ€์„ ์ž…๋ ฅํ•  ์ˆ˜ ์žˆ๋Š” ์œˆ๋„์šฐ๋ฅผ ํ™”๋ฉด์— ๋„์šด๋‹ค.
์‚ฌ์šฉ์ž๊ฐ€ ์ž…๋ ฅํ•œ ๋‚ด์šฉ์„ ๋ฌธ์ž์—ด๋กœ ๋ฐ˜ํ™˜ํ•œ๋‹ค.


์˜ˆ์‹œ) prompt("๋นˆ์นธ ์œ„์— ๋œจ๋Š” ๋ฌธ์žฅ", "๋นˆ์นธ์— ๋œจ๋Š” ๋ฌธ์žฅ") ๋‘๋ฒˆ์งธ ๋ถ€๋ถ„์€ ์ƒ๋žต ๊ฐ€๋Šฅํ•˜๋‹ค.

<script>
var age = prompt("๋‚˜์ด๋ฅผ ์ž…๋ ฅํ•˜์„ธ์š”.", "๋งŒ๋‚˜์ด๋กœ ์ž…๋ ฅํ•ฉ๋‹ˆ๋‹ค.");
</script>


๊ฒฐ๊ณผ)


- An integrated development environment (IDE) is software for building applications that combines common developer tools into a single GUI(Graphical user interface).

- 1 ์ดˆ [s] =
1000 ๋ฐ€๋ฆฌ์ดˆ [ms]


- ํ˜ธ์ถœํ•˜๋‹ค:
Calling a function is giving the computer a single instruction that tells it to do one thing.

Call [Computing] [with object] cause (a subroutine) to be executed
ex) one subroutine may call another subroutine (or itself) 

  • execute COMPUTING carry out an instruction or program.

Ch. 10 ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ DOM๊ณผ ์ด๋ฒคํŠธ ์ฒ˜๋ฆฌ, ์ž…๋ ฅ ๊ฒ€์ฆ

์ฑ…์˜ ๋ชฉ์ฐจ
-๋ฌธ์„œ ๊ฐ์ฒด ๋ชจ๋ธ(DOM)
-HTML ์š”์†Œ ์ฐพ๊ธฐ
-HTML ๋ณ€๊ฒฝํ•˜๊ธฐ
-DOM ๋…ธ๋“œ ์‚ญ์ œ์™€ ์ถ”๊ฐ€
-๋ธŒ๋ผ์šฐ์ € ๊ฐ์ฒด ๋ชจ๋ธ
-์ด๋ฒคํŠธ ์ฒ˜๋ฆฌ
-ํผ์˜ ์œ ํšจ์„ฑ ๊ฒ€์ฆ

4. DOM ๋…ธ๋“œ ์‚ญ์ œ์™€ ์ถ”๊ฐ€ p. 388

<img src="" alt="">
ex)

<img src="example.gif" alt="Example" width="200" height="100">


<a href=""> </a>
img, a: ํƒœ๊ทธ๋ช…

src, href, alt: ์†์„ฑ

4.1 ์ƒˆ๋กœ์šด HTML ์š”์†Œ ์ƒ์„ฑ

๋™์ ์œผ๋กœ ์›น ํŽ˜์ด์ง€์— ์ƒˆ๋กœ์šด ์š”์†Œ๋ฅผ ๋งŒ๋“ค์–ด์„œ ์ถ”๊ฐ€ํ•  ์ˆ˜ ์žˆ๋‹ค.

1. ์ฒซ ๋ฒˆ์งธ ๋‹จ๊ณ„๋Š” ์ถ”๊ฐ€ํ•˜๊ธฐ๋ฅผ ์›ํ•˜๋Š” ๋…ธ๋“œ๋ฅผ ์ƒ์„ฑํ•œ๋‹ค.
2. ๋‘ ๋ฒˆ์งธ ๋‹จ๊ณ„๋Š” ๋ฌธ์„œ ๋‚ด์—์„œ ์ถ”๊ฐ€ํ•  ์œ„์น˜๋ฅผ ์ฐพ๋Š”๋‹ค.
3. ์„ธ ๋ฒˆ์งธ ๋‹จ๊ณ„์—์„œ๋Š” ์ƒˆ๋กœ์šด ๋…ธ๋“œ๋ฅผ ๊ธฐ์กด์˜ ๋…ธ๋“œ์— ์—ฐ๊ฒฐํ•œ๋‹ค.


1. ๋…ธ๋“œ ์ƒ์„ฑ
document ๊ฐ์ฒด์˜ creatTextNode() ๋ฉ”์„œ๋“œ๋ฅผ ํ˜ธ์ถœํ•œ๋‹ค.
document.creatTextNode()๋Š” ํ…์ŠคํŠธ ๋ฐ์ดํ„ฐ๋ฅผ ๊ฐ€์ง„ ๋…ธ๋“œ๋ฅผ ์ƒ์„ฑํ•˜์—ฌ ๋ฐ˜ํ™˜ํ•œ๋‹ค.

var node = document.creatTextNode("๋™์ ์œผ๋กœ ์ถ”๊ฐ€๋œ ๋…ธ๋“œ");

2. ๋ฌธ์„œ ํŠธ๋ฆฌ์—์„œ ๋…ธ๋“œ๋ฅผ ์ถ”๊ฐ€ํ•  ์œ„์น˜๋ฅผ ์ฐพ๋Š”๋‹ค.
๊ฐ€์žฅ ๋งŽ์ด ์‚ฌ์šฉ๋˜๋Š” ๋ฐฉ๋ฒ•์€ id๋ฅผ ์ด์šฉํ•ด์„œ ํƒ์ƒ‰ํ•˜๋Š” ๋ฐฉ๋ฒ•์ด๋‹ค.
document.getElementById()๋ฅผ ํ˜ธ์ถœํ•œ๋‹ค.

์˜ˆ์‹œ)

<script>
function addtext(t){
	//๋…ธ๋“œ๋ฅผ ์ถ”๊ฐ€ํ•  ์ˆ˜ ์žˆ๋Š”์ง€ ๊ฒ€์‚ฌ
	if(document.createTextNode){
		//1 ๋…ธ๋“œ ์ƒ์„ฑ
		var node = document.creatTextNode(t);
		//2 ๋…ธ๋“œ ์ถ”๊ฐ€
		document.getElementById("target").appendChild(node);
	}
}

</script>
</head>
<body>
	<div id="target" onclick="addtext('๋™์ ์œผ๋กœ ํ…์ŠคํŠธ๊ฐ€ ์ถ”๊ฐ€๋ฉ๋‹ˆ๋‹ค.')" 
    style="font: 20px bold;">์—ฌ๊ธฐ๋ฅผ ํด๋ฆญํ•˜์„ธ์š”.</div>
</body>

4.2 ๊ธฐ์กด์˜ HTML ์š”์†Œ ์‚ญ์ œ

HTML์š”์†Œ๋ฅผ ์‚ญ์ œํ•˜๋ ค๋ฉด ๋ถ€๋ชจ ๋…ธ๋“œ๋ฅผ ์•Œ์•„์•ผ ํ•œ๋‹ค. ๋ถ€๋ชจ ๋…ธ๋“œ๋„ id๋ฅผ ์•Œ๋ฉด ์ฐพ์„ ์ˆ˜ ์žˆ๋‹ค.
DOM์˜ ๊ตฌ์กฐ์ƒ ๋ฐ˜๋“œ์‹œ ์‚ญ์ œํ•˜๊ณ ์ž ํ•˜๋Š” ์š”์†Œ์˜ ๊ทธ ๋ถ€๋ชจ ์š”์†Œ๋ฅผ ์•Œ์•„์•ผํ•œ๋‹ค.

1. ๋ถ€๋ชจ ๋…ธ๋“œ๋ฅผ ์ฐพ๋Š”๋‹ค.
2. ์ž์‹ ๋…ธ๋“œ๋ฅผ ์ฐพ๋Š”๋‹ค.
3. ๋ถ€๋ชจ ๋…ธ๋“œ๋ฅผ ํ†ตํ•˜์—ฌ ์ž์‹ ๋…ธ๋“œ๋ฅผ ์‚ญ์ œํ•œ๋‹ค.
์˜ˆ์‹œ 1)

<script>
	function removeNode(){
		//๋ถ€๋ชจ ๋…ธ๋“œ
		var parent = document.getElementById("target");
		//์‚ญ์ œํ•˜๊ณ ์ž ํ•˜๋Š” ์ž์‹ ๋…ธ๋“œ
		var child = document.getElementById("p1");
		parent.removeChild(child);
	}
</script>

</head>
<body>
<div id="target">
	<p id = "p1">์ฒซ๋ฒˆ์งธ ๋‹จ๋ฝ</p>
	<p id = "p2">๋‘๋ฒˆ์งธ ๋‹จ๋ฝ</p>
</div>
	<button onclick="removeNode()">๋ˆ„๋ฅด์„ธ์š”!</button>
</body>

๊ฒฐ๊ณผ)


์˜ˆ์‹œ 2)

appendChild()

์ƒˆ๋กœ์šด ๋…ธ๋“œ๋ฅผ ํ•ด๋‹น ๋…ธ๋“œ์˜ ์ž์‹ ๋…ธ๋“œ ๋ฆฌ์ŠคํŠธ(child node list)์˜ ๋งจ ๋งˆ์ง€๋ง‰์— ์ถ”๊ฐ€ํ•œ๋‹ค.
The appendChild() method of the Node interface adds a node to the end of the list of children of a specified parent node.

createElement()

์ƒˆ๋กœ์šด ์š”์†Œ ๋…ธ๋“œ๋ฅผ ๋งŒ๋“ค ์ˆ˜ ์žˆ๋‹ค.
The document.createElement() method creates the HTML element specified by tagName, or an HTMLUnknownElement if tagName isn't recognized.

createTextNode()

์ƒˆ๋กœ์šด ํ…์ŠคํŠธ ๋…ธ๋“œ๋ฅผ ๋งŒ๋“ค ์ˆ˜ ์žˆ๋‹ค.

์ฐธ๊ณ : http://www.tcpschool.com/javascript/js_dom_nodeManage

<script>
function newRegister(){ 
	var newItem = document.createElement("li");
	var subject = document.getElementById("subject");
	var nextText = document.createTextNode(subject.value); //์—ฌ๊ธฐ์— ์ž…๋ ฅ๋œ ๊ฐ’์ด ๋ฆฌ์ŠคํŠธ๋กœ ๋‚˜์˜ด 
	
	//The appendChild() method of the Node interface adds a node 
	//to the end of the list of children of a specified parent node.
	
	newItem.appendChild(nextText);//<li>javascript</li>: ์ž…๋ ฅ๋ž€์— javascript ์ž…๋ ฅํ–ˆ๋‹ค๊ณ  ๊ฐ€์ •ํ•œ๋‹ค. 
	
	var itemList = document.getElementById("itemList");
	
	itemList.appendChild(newItem);
}
</script>
</head>

<body>
	<div>
		<h1>Web Programming</h1>
		<p>๊ณต๋ถ€ํ•  ์ฃผ์ œ๋ฅผ ๊ธฐ๋กํ•ด๋ณด์„ธ์š”</p>
		<input type="text" id="subject">
		<button onclick="newRegister()">์ถ”๊ฐ€</button>
		
		<ul id="itemList"></ul>
	</div>
</body>

๊ฒฐ๊ณผ)


5. ๋ธŒ๋ผ์šฐ์ € ๊ฐ์ฒด ๋ชจ๋ธ p. 391

5.1 ๋ธŒ๋ผ์šฐ์ € ๊ฐ์ฒด ๋ชจ๋ธ

๋ธŒ๋ผ์šฐ์ € ๊ฐ์ฒด ๋ชจ๋ธ(BOM: Brower Object Model)์€ ์›น ๋ธŒ๋ผ์šฐ์ €๊ฐ€ ๊ฐ€์ง€๊ณ  ์žˆ๋Š” ๋ชจ๋“  ๊ฐ์ฒด๋ฅผ ์˜๋ฏธํ•œ๋‹ค.
์ตœ์ƒ์œ„ ๊ฐ์ฒด๋Š” window์ด๊ณ  navigator, location, history, screen, document, frames ๊ฐ์ฒด๊ฐ€ ์žˆ๋‹ค.
์ง€๊ธˆ๊นŒ์ง€ ๋งŽ์ด ์‚ฌ์šฉํ•˜์˜€๋˜ document ๊ฐ์ฒด๋„ ์‚ฌ์‹ค์€ window ๊ฐ์ฒด์˜ ์ž์‹์ด๋‹ค.
- window: ๋ฉ”์ธ ๋ธŒ๋ผ์šฐ์ € ์œˆ๋„์šฐ
- window.navigator: ๋ธŒ๋ผ์šฐ์ €์— ๋Œ€ํ•œ ์ •๋ณด(ex. ๋ฒ„์ „ ์ •๋ณด)
- window.screen: ์‚ฌ์šฉ์ž ํ™”๋ฉด
- window.history: ์‚ฌ์šฉ์ž๊ฐ€ ๋ฐฉ๋ฌธํ•œ URL ์ €์žฅ
- window.location: ํ˜„์žฌ URL
- window.frames: ๋ธŒ๋ผ์šฐ์ € ์œˆ๋„์šฐ๋ฅผ ์ฐจ์ง€ํ•˜๊ณ  ์žˆ๋Š” ํ”„๋ ˆ์ž„๋“ค
- window.document: ๋ฉ”์ธ ๋ธŒ๋ผ์šฐ์ €์— ํ‘œ์‹œ๋œ HTML ๋ฌธ์„œ


5.2 Window ๊ฐ์ฒด

window ๊ฐ์ฒด๋Š” BOM์—์„œ ์ตœ์ƒ์œ„ ๊ฐ์ฒด๋กœ์„œ ์›น ๋ธŒ๋ผ์šฐ์ €์˜ ์œˆ๋„์šฐ๋ฅผ ๋‚˜ํƒ€๋‚ด๊ณ  ์žˆ๋‹ค.
๋ชจ๋“  ์ „์—ญ ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ ๊ฐ์ฒด, ํ•จ์ˆ˜, ๋ณ€์ˆ˜๋Š” ์ž๋™์ ์œผ๋กœ window ๊ฐ์ฒด์˜ ๋ฉค๋ฒ„๊ฐ€ ๋œ๋‹ค.

ex) window ๊ฐ์ฒด์˜ ๋ฉ”์„œ๋“œ: alert(), prompt()

๋ชจ๋“  ์ „์—ญ ๋ณ€์ˆ˜๋Š” ์œˆ๋„์šฐ ๊ฐ์ฒด์˜ ์†์„ฑ์ด๋‹ค.
๋ชจ๋“  ์ „์—ญ ํ•จ์ˆ˜๋Š” ์œˆ๋„์šฐ ๊ฐ์ฒด์˜ ๋ฉ”์„œ๋“œ์ด๋‹ค.

alert() ํ•จ์ˆ˜๊ฐ€ widow ๊ฐ์ฒด์˜ ๋ฉ”์„œ๋“œ์ด๊ธฐ ๋•Œ๋ฌธ์— ๋‹ค์Œ 2๊ฐœ์˜ ๋ฌธ์žฅ์€ ๋™์ผํ•˜๋‹ค.

alert("Hello World!");
window.alert("Hello World!");

 

1) open()๊ณผ close()

open() ๋ฉ”์„œ๋“œ๋Š” ์ƒˆ๋กœ์šด ๋ธŒ๋ผ์šฐ์ € ์œˆ๋„์šฐ๋ฅผ ์˜คํ”ˆํ•œ๋‹ค.

window.open(URL, name, specs, replace);



์˜ˆ์‹œ) ํŒ์—…์ฐฝ์„ ๋งŒ๋“ค ๋•Œ ์“ด๋‹ค.

<input type="button" value="๊ตฌ๊ธ€์ฐฝ ์—ด๊ธฐ" 
onclick = "window.open('http://www.google.com/','_blank', 'width=300, height=300')">

2) setTimeout(), setInterval()

setTimeout() ๋ฉ”์„œ๋“œ๋Š” ์ผ์ •ํ•œ ์‹œ๊ฐ„์ด ์ง€๋‚œ ํ›„์—, ์ธ์ˆ˜๋กœ ์ „๋‹ฌ๋œ ํ•จ์ˆ˜๋ฅผ ๋”ฑ ํ•œ ๋ฒˆ๋งŒ ํ˜ธ์ถœํ•œ๋‹ค. ์‹œ๊ฐ„์˜ ๋‹จ์œ„๋Š” ๋ฐ€๋ฆฌ์ดˆ์ด๋‹ค.

setTimeout(code, millisec)


์˜ˆ์‹œ 1)

<script>
function showAlert(){
	setTimeout(function(){alert("setTimeout()์„ ์‚ฌ์šฉํ•˜์—ฌ ํ‘œ์‹œ๋ฉ๋‹ˆ๋‹ค.")}, 3000)
}
</script>
</head>
<body>
<p>๋ฒ„ํŠผ์„ ๋ˆ„๋ฅด๋ฉด 3์ดˆ ํ›„์— ๊ฒฝ๊ณ  ๋ฐ•์Šค๊ฐ€ ํ™”๋ฉด์— ํ‘œ์‹œ๋ฉ๋‹ˆ๋‹ค.</p>
<button onclick="showAlert()">๋ˆŒ๋Ÿฌ๋ณด์„ธ์š”.</button>
</body>


setInterval() ๋ฉ”์„œ๋“œ๋Š” ์ผ์ •ํ•œ ์‹œ๊ฐ„๋งˆ๋‹ค ์ฃผ๊ธฐ์ ์œผ๋กœ ํ•จ์ˆ˜๋ฅผ ํ˜ธ์ถœํ•œ๋‹ค. ๋ฐ˜๋“œ์‹œ ๊ฐœ๋ฐœ์ž๊ฐ€ ์ข…๋ฃŒ์‹œ์ผœ์•ผ ํ•œ๋‹ค. ์‹œ๊ฐ„์˜ ๋‹จ์œ„๋Š” ๋ฐ€๋ฆฌ์ดˆ์ด๋‹ค.
์ฃผ๊ธฐ์ ์ธ ํ˜ธ์ถœ์„ ์ข…๋ฃŒํ•˜๋ ค๋ฉด clearInterval()์„ ํ˜ธ์ถœํ•œ๋‹ค.


์˜ˆ์‹œ 2)

<script>
function showAlert(){
	setInterval(function(){alert("setTimeout()์„ ์‚ฌ์šฉํ•˜์—ฌ ํ‘œ์‹œ๋ฉ๋‹ˆ๋‹ค.")}, 3000)
}
</script>
</head>
<body>
<p>๋ฒ„ํŠผ์„ ๋ˆ„๋ฅด๋ฉด 3์ดˆ ํ›„์— ๊ฒฝ๊ณ  ๋ฐ•์Šค๊ฐ€ ํ™”๋ฉด์— ํ‘œ์‹œ๋ฉ๋‹ˆ๋‹ค.</p>
<button onclick="showAlert()">๋ˆŒ๋Ÿฌ๋ณด์„ธ์š”.</button>
</body>

๊ฒฐ๊ณผ)


์˜ˆ์‹œ 3) ์‚ฌ์šฉ์ž๊ฐ€ "์ค‘์ง€" ๋ฒ„ํŠผ์„ ๋ˆ„๋ฅผ ๋•Œ๊นŒ์ง€ ๊ธ€์ž๊ฐ€ ๊นœ๋นก์ด๋Š” ํ”„๋กœ๊ทธ๋žจ์ด๋‹ค. p.395

<script>
	var id;
	function changeColor(){
    	//์ •์ง€์‹œํ‚ค๋ ค๋ฉด ๋ฐ˜ํ™˜๊ฐ’์„ ์ €์žฅํ•œ๋‹ค.
		id = setInterval(flashText,500);
	}
	function flashText(){
		var elem = document.getElementById("target");
        //์กฐ๊ฑด ? ์ฐธ์ผ ๋•Œ : ๊ฑฐ์ง“์ผ ๋•Œ
		elem.style.color = (elem.style.color=="red") ? "blue" : "red"; 
		elem.style.backgroundColor = 
			(elem.style.backgroundColor=="green") ? "yellow" : "green"; 
	}
	function stopTextColor(){
    	//๋ฐ˜ํ™˜๊ฐ’์„ ์ด์šฉํ•˜์—ฌ ์ฃผ๊ธฐ์  ํ˜ธ์ถœ์„ ์ค‘์ง€ํ•œ๋‹ค.
		clearInterval(id);
	}
</script>
</head>
<body onload = "changeColor();">
<div id = "target">
	<p>This is a Text.</p>
</div>
<button onclick = "stopTextColor()">์ค‘์ง€</button>
</body>

๊ฒฐ๊ณผ) ์ค‘์ง€์‹œ์ผฐ์„ ๋•Œ์˜ ๊ฒฐ๊ณผ์ด๋‹ค. elem.style.color์€ ํŒŒ๋ž€์ƒ‰์ด๊ณ , elem.style.backgroundColor์€ ๋…ธ๋ž€์ƒ‰์œผ๋กœ ์„ค์ •๋˜์—ˆ๋‹ค.


3) moveTo(), moveBy()

์ ˆ๋Œ€์ ์ธ ์œ„์น˜๋กœ ์ด๋™ํ•˜๋Š” ๊ฒƒ์€ moveTo()๋ฅผ ์‚ฌ์šฉํ•˜๊ณ  ์ƒ๋Œ€์ ์œผ๋กœ ์ด๋™ํ•˜๋ ค๋ฉด moveBy()๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค.

- resizeTo(), resizeBy(): ์œˆ๋„์šฐ ํฌ๊ธฐ๋ฅผ ๋ณ€๊ฒฝํ•œ๋‹ค.
- focus(): ํŠน์ • ์œˆ๋„์šฐ๋กœ ํ‚ค๋ณด๋“œ ํฌ์ปค์Šค๋ฅผ ์ด๋™์‹œํ‚จ๋‹ค.
- scrollTo(), scrollBy(): ์œˆ๋„์šฐ ์Šคํฌ๋กค ์œ„์น˜๋ฅผ ์ด๋™์‹œํ‚จ๋‹ค.
์˜ˆ์‹œ) w.moveBy(10, 10): ํ•œ ๋ฒˆ ๋ˆ„๋ฅผ ๋•Œ๋งˆ๋‹ค ํ™”๋ฉด์—์„œ (10,10)์”ฉ ์ด๋™ํ•œ๋‹ค. ๊ธฐ๋ณธ ์œ„์น˜๋Š” (0,0)์œผ๋กœ ์„ค์ •ํ•œ ์ขŒ์ธก ์ƒ๋‹จ์ด๋‹ค.

<script>
	var w;
	function openWindow(){
		w = window.open("","","width=200, height=100");
		//w.๋ฅผ ์จ์„œ ํŒ์—…์ฐฝ ์•ˆ์— ๋‚ด์šฉ์ด ๋‚˜์˜จ๋‹ค. 
		w.document.write("<p>์˜ค๋Š˜ ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์ƒํ’ˆ์„ ์‹ธ๊ฒŒ ํŒ๋‹ˆ๋‹ค.</p>");
		w.moveTo(0,0);
	}
	function moveWindow(){
		//ํ•œ ๋ฒˆ ๋ˆ„๋ฅผ ๋•Œ๋งˆ๋‹ค ํ™”๋ฉด์—์„œ (10,10)์”ฉ ์ด๋™ํ•œ๋‹ค.
		w.moveBy(10, 10);
		w.focus();
	}
</script>
</head>
<body>
	<input type="button" value="์œˆ๋„์šฐ ์ƒ์„ฑ" onclick="openWindow()"><br>
	<input type="button" value="์œˆ๋„์šฐ ์ƒ์„ฑ" onclick="moveWindow()">
</body>

๊ฒฐ๊ณผ)


5.3 screen ๊ฐ์ฒด p. 397

availHeight, availWidth: ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ๋ฅผ ์ด์šฉํ•ด ์œˆ๋„์šฐ์˜ ํ…Œ์Šคํฌ ๋ฐ”๋ฅผ ๊ฐ€๋ฆฌ์ง€ ์•Š์œผ๋ฉด์„œ ์ตœ๋Œ€ ํฌ๊ธฐ๋กœ ์œˆ๋„์šฐ๋ฅผ ์˜คํ”ˆํ•  ๋•Œ ์‚ฌ์šฉํ•œ๋‹ค.

์†์„ฑ ์„ค๋ช…
availHeight ํ™”๋ฉด์˜ ๋†’์ด๋ฅผ ๋ฐ˜ํ™˜(์œˆ๋„์šฐ์—์„œ ํƒœ์Šคํฌ ๋ฐ”๋ฅผ ์ œ์™ธํ•œ ์˜์—ญ)
availWidth ํ™”๋ฉด์˜ ๋„ˆ๋น„๋ฅผ ๋ฐ˜ํ™˜(์œˆ๋„์šฐ์—์„œ ํƒœ์Šคํฌ ๋ฐ”๋ฅผ ์ œ์™ธํ•œ ์˜์—ญ)
colorDepth ์ปฌ๋Ÿฌ ํŒ”๋ ˆํŠธ์˜ ๋น„ํŠธ ๊นŠ์ด๋ฅผ ๋ฐ˜ํ™˜
height ํ™”๋ฉด ์ „์ฒด์˜ ๋†’์ด๋ฅผ ๋ฐ˜ํ™˜
pixelDepth ํ™”๋ฉด์˜ ์ปฌ๋Ÿฌ ํ•ด์ƒ๋„(bits per pixel)๋ฅผ ๋ฐ˜ํ™˜
width ํ™”๋ฉด์˜ ์ „์ฒด ๋„ˆ๋น„๋ฅผ ๋ฐ˜ํ™˜

์˜ˆ์‹œ) ์ „์ฒด์ฐฝ์œผ๋กœ ๋œฌ๋‹ค.

<script>
	function maxopen(url, winattributes){
		var maxwindow = window.open(url,"",winattributes);
		maxwindow.moveTo(0,0);
		maxwindow.resizeTo(screen.availWidth, screen.availHeight);
	}
</script>
</head>
<body>
<a href = "#" onclick = "maxopen('http://www.google.com',
		'resize=1, scrollbars=1, status=1'); return False">์ „์ฒด ํ™”๋ฉด ๋ณด๊ธฐ</a>
</body>

5.4 location ๊ฐ์ฒด

location ๊ฐ์ฒด๋Š” ํ˜„์žฌ URL์— ๋Œ€ํ•œ ์ •๋ณด๋ฅผ ๊ฐ€์ง€๊ณ  ์žˆ๋‹ค. window ๊ฐ์ฒด์˜ ์ผ๋ถ€๋กœ์„œ widow.location์„ ํ†ตํ•˜์—ฌ ์ ‘๊ทผ๋œ๋‹ค.
location ๊ฐ์ฒด์˜ ์†์„ฑ

์†์„ฑ ์„ค๋ช…
hash URL ์ค‘์—์„œ ์•ต์ปค ๋ถ€๋ถ„์„ ๋ฐ˜ํ™˜ํ•œ๋‹ค. (#section1๊ณผ ๊ฐ™์€ ๋ถ€๋ถ„)
host URL ์ค‘์—์„œ hostname๊ณผ port๋ฅผ ๋ฐ˜ํ™˜ํ•œ๋‹ค.
hostname URL ์ค‘์—์„œ hostname์„ ๋ฐ˜ํ™˜ํ•œ๋‹ค.
href ์ „์ฒด URL์„ ๋ฐ˜ํ™˜ํ•œ๋‹ค.
pathname URL ์ค‘์—์„œ ๊ฒฝ๋กœ(path)๋ฅผ ๋ฐ˜ํ™˜ํ•œ๋‹ค.
port URL ์ค‘์—์„œ port๋ฅผ ๋ฐ˜ํ™˜ํ•œ๋‹ค.
protocol URL ์ค‘์—์„œ protocol ๋ถ€๋ถ„์„ ๋ฐ˜ํ™˜ํ•œ๋‹ค.
search URL ์ค‘์—์„œ ์ฟผ๋ฆฌ(query) ๋ถ€๋ถ„์„ ๋ฐ˜ํ™˜ํ•œ๋‹ค.

location ๊ฐ์ฒด์˜ ๋ฉ”์„œ๋“œ

๋ฉ”์„œ๋“œ ์„ค๋ช…
assign() ์ƒˆ๋กœ์šด ๋ฌธ์„œ๋ฅผ ๋กœ๋“œํ•œ๋‹ค.
reload() ํ˜„์žฌ ๋ฌธ์„œ๋ฅผ ๋‹ค์‹œ ๋กœ๋“œํ•œ๋‹ค.
replace() ํ˜„์žฌ ๋ฌธ์„œ๋ฅผ ์ƒˆ๋กœ์šด ๋ฌธ์„œ๋กœ ๋Œ€์ฒดํ•œ๋‹ค.

์˜ˆ์‹œ)

<script>
function replace(){
	location.replace("http://www.naver.com")
}
</script>
<!-- document.write(location.href); -->
<a href ="#" onclick="replace()">์ด๋™ํ•˜๊ธฐ</a>

6. ์ด๋ฒคํŠธ ์ฒ˜๋ฆฌ p. 400

์›น ํŽ˜์ด์ง€์—์„œ ์ƒํ˜ธ์ž‘์šฉ์ด ๋ฐœ์ƒํ•˜๋ฉด ์ด๋ฒคํŠธ๊ฐ€ ์ผ์–ด๋‚œ๋‹ค.

์˜ˆ์‹œ)
- ๋งˆ์šฐ์Šค ํด๋ฆญ

- ์›น ํŽ˜์ด์ง€ ๋กœ๋”ฉ
- ํ˜ธ๋ฒ„๋ง(hovering)์œผ๋กœ ๋งˆ์šฐ์Šค๋ฅผ ์–ด๋–ค ์š”์†Œ ์œ„์—์„œ ์›€์ง์ด๋Š” ๊ฒƒ
- HTML ์ž…๋ ฅ ์–‘์‹์—์„œ ์ž…๋ ฅ ๋ฐ•์Šค๋ฅผ ์„ ํƒํ•˜๋Š” ๊ฒƒ
- ํ‚ค๋ณด๋“œ์˜ ํ‚ค๋ฅผ ๋ˆ„๋ฅด๋Š” ๊ฒƒ

์ˆœ์„œ)

1. ์‚ฌ์šฉ์ž๊ฐ€ ๋ฒ„ํŠผ์„ ํด๋ฆญํ•œ๋‹ค. ex) ๋ˆŒ๋Ÿฌ๋ณด์„ธ์š”!
2. ์ด๋ฒคํŠธ๊ฐ€ ๋ฐœ์ƒํ•œ๋‹ค.
3. ๋“ฑ๋ก๋œ ํ•จ์ˆ˜๊ฐ€ ์‹คํ–‰๋œ๋‹ค. ex) function processEvent(){ ... }
4. ํŽ˜์ด์ง€์— ๋ณ€ํ™”๊ฐ€ ๋ฐœ์ƒํ•œ๋‹ค.
ex) ๊ณผ์ผ๋“ค์˜ ๋ฆฌ์ŠคํŠธ
- ์‚ฌ๊ณผ
- ๋ฐ”๋‚˜๋‚˜
- ์˜ค๋ Œ์ง€
๋ˆŒ๋Ÿฌ๋ณด์„ธ์š”!

 

6.1 onclick ์ด๋ฒคํŠธ

๊ฐ€์žฅ ๋งŽ์ด ์‚ฌ์šฉ๋˜๋Š” ์ด๋ฒคํŠธ์ด๋‹ค. ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ๋กœ ์‚ฌ์šฉ์ž๊ฐ€ ๋ฒ„ํŠผ์„ ํด๋ฆญํ•˜๋Š” ๊ฒƒ ๊ฐ™์€ ์ด๋ฒคํŠธ๊ฐ€ ๋ฐœ์ƒํ•˜๋ฉด ๋ฏธ๋ฆฌ ์ •ํ•ด๋†“์€ ์ฝ”๋“œ๊ฐ€ ์‹คํ–‰๋˜๋„๋ก ํ•  ์ˆ˜ ์žˆ๋‹ค.

//ํ—ค๋”ฉ์ด ํด๋ฆญ๋˜๋ฉด ์—ฌ๊ธฐ์— ๋“ฑ๋ก๋œ ํ•จ์ˆ˜ change๊ฐ€ ํ˜ธ์ถœ๋œ๋‹ค. 
<h1 onclick = "change()"> ์ด๊ฒƒ์€ ํด๋ฆญ ๊ฐ€๋Šฅํ•œ ํ—ค๋”ฉ์ž…๋‹ˆ๋‹ค. </h1>

์˜ˆ์‹œ)

<script>
//์„ ์–ธ๋ฌธ์— c ๋ณ€์ˆ˜์— ์ €์žฅํ•œ๋‹ค. 
function changeColor(c){
	//์ƒ‰์ƒ์„ ๋ณ€์ˆ˜ ์ฒ˜๋ฆฌํ•ด์•ผํ•œ๋‹ค.
	//id๊ฐ€ "target"์ธ ์š”์†Œ์˜ ๋ฐฐ๊ฒฝ์ƒ‰์„ ์ฃผ์–ด์ง„ ์ƒ‰์œผ๋กœ ๋ณ€๊ฒฝํ•œ๋‹ค. 
	document.getElementById("target").style.backgroundColor = c;
}
</script>
</head>
<body id = "target">
	<form>
		<!-- ๋ฒ„ํŠผ์ด ํด๋ฆญ๋˜๋ฉด ์—ฌ๊ธฐ์— ๋“ฑ๋ก๋œ ํ•จ์ˆ˜ changeColor๊ฐ€ ํ˜ธ์ถœ๋œ๋‹ค --> 
		<input type = "radio" name ="c1" value = "v1" onclick = "changeColor('blue')">ํŒŒ๋ž‘์ƒ‰
		<input type = "radio" name ="c1" value = "v1" onclick = "changeColor('green')">๋…น์ƒ‰
	</form>
</body>

๊ฒฐ๊ณผ)


6.2 onload์™€ onunload ์ด๋ฒคํŠธ

์‚ฌ์šฉ์ž๊ฐ€ ์›น ํŽ˜์ด์ง€์— ์ง„์ž…ํ•˜๊ฑฐ๋‚˜ ์›น ํŽ˜์ด์ง€๋ฅผ ๋– ๋‚˜๋ฉด ๊ฐ๊ฐ onload์™€ onunload ์ด๋ฒคํŠธ๊ฐ€ ๋ฐœ์ƒ๋œ๋‹ค.
์˜ˆ์‹œ) ํŽ˜์ด์ง€๊ฐ€ ๋กœ๋“œ๋˜๋ฉด ๊ฒฝ๊ณ  ๋Œ€ํ™”์ƒ์ž๋ฅผ ๋„์šฐ๊ณ  ํŽ˜์ด์ง€์˜ ๋ฐฐ๊ฒฝ์ƒ‰์„ ๋นจ๊ฐ„์ƒ‰์œผ๋กœ ๋ณ€๊ฒฝํ•˜์—ฌ ๋ณธ๋‹ค.

<script>
//๋ฌธ์„œ๊ฐ€ ๋กœ๋“œ๋˜๋ฉด ์•„๋ž˜ ํ•จ์ˆ˜๊ฐ€ ํ˜ธ์ถœ๋œ๋‹ค. 
function onLoadDoc(){
	alert("๋ฌธ์„œ๊ฐ€ ๋กœ๋“œ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.");
	//<body>์š”์†Œ๊ฐ€ ๋นจ๊ฐ„์ƒ‰์œผ๋กœ ๋ณ€๊ฒฝํ•œ๋‹ค.
	document.body.style.backgroundColor="red";
}
</script>
</head>
<body onload = "onLoadDoc()">
</body>

๊ฒฐ๊ณผ)


6.3 onchange ์ด๋ฒคํŠธ

์ž…๋ ฅ ํ•„๋“œ๋ฅผ ๊ฒ€์ฆํ•  ๋•Œ ์ข…์ข… ์‚ฌ์šฉ๋œ๋‹ค.
์˜ˆ์‹œ) ์‚ฌ์šฉ์ž๊ฐ€ ์ž…๋ ฅ ํ•„๋“œ์˜ ๋‚ด์šฉ์„ ๋ณ€๊ฒฝํ•˜๋ฉด upperCase() ํ•จ์ˆ˜๊ฐ€ ํ˜ธ์ถœ๋œ๋‹ค.

<script>
	//<input> ์š”์†Œ์˜ ๋‚ด์šฉ์ด ๋ณ€๊ฒฝ๋˜๋ฉด ํ˜ธ์ถœ๋œ๋‹ค. 
	//ํ‚ค๋ณด๋“œ ํฌ์ปค์Šค๊ฐ€ ์ž…๋ ฅ ํ•„๋“œ๋ฅผ ๋ฒ—์–ด๋‚˜๋ฉด ๋ณ€๊ฒฝ ์—ฌ๋ถ€๋ฅผ ๊ฒ€์‚ฌํ•˜์—ฌ ํ˜ธ์ถœํ•œ๋‹ค. 
	function sub(){
		var x = document.getElementById("name");
		x.value = x.value.toLowerCase();
	}
</script>
</head>
<body>
์˜์–ด ๋‹จ์–ด: <input type="text" id="name" onchange="sub()">
<p>์ž…๋ ฅ ํ•„๋“œ๋ฅผ ๋ฒ—์–ด๋‚˜๋ฉด ์†Œ๋ฌธ์ž๋กœ ๋ณ€๊ฒฝ๋ฉ๋‹ˆ๋‹ค.</p>
</body>

๊ฒฐ๊ณผ)


6.4 onmouseover ์ด๋ฒคํŠธ

onmousover์™€ onmouseout ์ด๋ฒคํŠธ๋Š” ์‚ฌ์šฉ์ž๊ฐ€ HTML ์š”์†Œ ์œ„์— ๋งˆ์šฐ์Šค๋ฅผ ์˜ฌ๋ฆฌ๊ฑฐ๋‚˜ ์š”์†Œ๋ฅผ ๋– ๋‚  ๋•Œ ๋ฐœ์ƒํ•œ๋‹ค.

์˜ˆ์‹œ)

<script>
function OnMouseIn(elem){
	//border: ํ…Œ๋‘๋ฆฌ 
	elem.style.border = "2px solid red";
}
function OnMouseOut(elem){
	elem.style.border = "";
}
</script>
</head>
<body>
<!-- this: ๊ฐ์ฒด์ด๋ฉฐ ๋ณ€์ˆ˜๊ฐ€ ์•„๋‹ˆ๋‹ค. -->
<div style = "background-color: yellow; width: 200px"
	onmouseover = "OnMouseIn (this)" onmouseout = "OnMouseOut (this)">
	๋งˆ์šฐ์Šค๋ฅผ ์ด ์š”์†Œ ์œ„์— ์ด๋™ํ•˜์„ธ์š”.
</div>
</body>

๊ฒฐ๊ณผ)


6.5 onmousedown, onmouseup, onclick ์ด๋ฒคํŠธ

๋งˆ์šฐ์Šค ํด๋ฆญ๊ณผ ๊ด€๋ จ๋œ ์ด๋ฒคํŠธ์ด๋‹ค.
1. ๋จผ์ € ๋งˆ์šฐ์Šค ๋ฒ„ํŠผ์ด ํด๋ฆญ๋˜๋ฉด onmousedown ์ด๋ฒคํŠธ๊ฐ€ ๋ฐœ์ƒํ•œ๋‹ค.
2. ์ด์–ด์„œ ๋งˆ์šฐ์Šค ๋ฒ„ํŠผ์ด ๋–ผ์–ด์ง€๋ฉด onmouseup ์ด๋ฒคํŠธ๊ฐ€ ๋ฐœ์ƒํ•˜๊ณ 
3. ๋งˆ์ง€๋ง‰์œผ๋กœ ๋งˆ์šฐ์Šค ํด๋ฆญ์ด ์™„๋ฃŒ๋˜๋ฉด์„œ onclick ์ด๋ฒคํŠธ๊ฐ€ ๋ฐœ์ƒํ•œ๋‹ค.

์˜ˆ์‹œ) ๋งˆ์šฐ์Šค ๋ฒ„ํŠผ์ด ๋ˆŒ๋ ค์ง€๋ฉด ๋ฒ„ํŠผ์˜ ์ƒ‰์ƒ์„ ๋นจ๊ฐ„์ƒ‰์œผ๋กœ ๋ณ€๊ฒฝํ•œ๋‹ค.

<script>
function OnButtonDown(button){
	//๋งˆ์šฐ์Šค ๋ฒ„ํŠผ์ด ๋ˆŒ๋Ÿฌ์ง€๋ฉด ๋ฒ„ํŠผ์˜ ์ƒ‰์ƒ์„ ๋นจ๊ฐ„์ƒ‰์œผ๋กœ ๋ณ€๊ฒฝํ•œ๋‹ค. 
	button.style.color = "#ff0000";
}
function OnButtonUp(button){
	//๋งˆ์šฐ์Šค ๋ฒ„ํŠผ์ด ๋–ผ์–ด์ง€๋ฉด ๋ฒ„ํŠผ์˜ ์ƒ‰์ƒ์„ ๊ฒ€์ •์ƒ‰์œผ๋กœ ๋ณ€๊ฒฝํ•œ๋‹ค.
	button.style.color = "#000000";
}
</script>
</head>
<body>
	<button onmousedown="OnButtonDown (this)" onmouseup="OnButtonUp (this)">
	๋ˆŒ๋Ÿฌ๋ณด์„ธ์š”!</button>
</body>

๊ฒฐ๊ณผ)


๊ธฐํƒ€
๊ฐœ์ธ ํฌํŠธํด๋ฆฌ์˜ค
1/25๊นŒ์ง€ ๊ฐœ์ธํฌํŠธํด๋ฆฌ์˜ค ์ฃผ์ œ ๋ฐ ๋ฉ”์ธ ํ™”๋ฉด ์„ค๊ณ„ ์ƒ๊ฐํ•˜๊ธฐ (ํผ์˜ ์œ ํšจ์„ฑ ๊ฒ€์‚ฌ ์ ์šฉ์‹œํ‚ค๊ธฐ)
1. ์ฃผ์ œ
2. ๋ฉ”์ธ ํ™”๋ฉด ์„ค๊ณ„
3. ๋ฉ”์ธ ํ™”๋ฉด ๊ตฌํ˜„


728x90
๋ฐ˜์‘ํ˜•

'๐ŸŒณBootcamp Revision 2023โœจ > JavaScript, jQuery, Ajax, JSON' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

[19] 230125 Ch. 12 jQUERY, Ajax, JSON: 1. jQuery, 2. ์ฒซ ๋ฒˆ์งธ jQuery ํ”„๋กœ๊ทธ๋žจ, 3. jQuery ๋ฌธ์žฅ์˜ ๊ตฌ์กฐ, 4. jQuery๋ฅผ ์ด์šฉํ•œ ์ด๋ฒคํŠธ ์ฒ˜๋ฆฌ ยท 5. ์• ๋‹ˆ๋ฉ”์ด์…˜ ํšจ๊ณผ [K-๋””์ง€ํ„ธ ํŠธ๋ ˆ์ด๋‹ 19์ผ]  (0) 2023.01.25
[18] 230120 Ch. 10 ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ DOM๊ณผ ์ด๋ฒคํŠธ ์ฒ˜๋ฆฌ, ์ž…๋ ฅ ๊ฒ€์ฆ: 7. ํผ์˜ ์œ ํšจ์„ฑ ๊ฒ€์ฆ [K-๋””์ง€ํ„ธ ํŠธ๋ ˆ์ด๋‹ 18์ผ]  (0) 2023.01.20
[16] 230118 Ch. 10 ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ DOM๊ณผ ์ด๋ฒคํŠธ ์ฒ˜๋ฆฌ, ์ž…๋ ฅ ๊ฒ€์ฆ: 1. ๋ฌธ์„œ ๊ฐ์ฒด ๋ชจ๋ธ(DOM), 2. HTML ์š”์†Œ ์ฐพ๊ธฐ, 3. HTML ๋ณ€๊ฒฝํ•˜๊ธฐ [K-๋””์ง€ํ„ธ ํŠธ๋ ˆ์ด๋‹ 16์ผ]  (0) 2023.01.18
[15] 230117 Ch. 9 ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ ๊ฐ์ฒด: 1. ๊ฐ์ฒด, 2. ๊ฐ์ฒด์˜ ์ƒ์„ฑ ๋ฐ ์‚ฌ์šฉ, 3. ํ”„๋กœํ† ํƒ€์ž…, 4. ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ ๋‚ด์žฅ ๊ฐ์ฒด, 5. Array ๊ฐ์ฒด, 6. ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ์—์„œ์˜ ์˜ค๋ฅ˜ ์ฒ˜๋ฆฌ [K-๋””์ง€ํ„ธ ํŠธ๋ ˆ์ด๋‹ 15์ผ]  (0) 2023.01.17
Comments