Skip to content

Commit 3e6c59b

Browse files
author
Douglas1688
committed
[WIP] Clase 1 DOM.
1 parent 8aec967 commit 3e6c59b

3 files changed

Lines changed: 30 additions & 1 deletion

File tree

clase_16/script.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ Accede al primer elemento que conincida con selector CSS */
2222

2323

2424
const paragraphArray = Array.from(document.querySelectorAll('.paragraph'));
25-
paragraphArray.map(p=>p.style.color='blue');
25+
paragraphArray.map(p=>p.style.color='green');

clase_17/index.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE html>
2+
<html lang="es">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>DOM - Acceder a elementos/nodos</title>
6+
<!-- <link rel="stylesheet" href="styles.css"> -->
7+
</head>
8+
<body>
9+
<h1 id="title" class="title">Atributos de JavaScript</h1>
10+
<form>
11+
<label for="name">Name :</label>
12+
<input id="name" type="text"/>
13+
</form>
14+
<script src="script.js"></script>
15+
</body>
16+
</html>

clase_17/script.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/*
2+
Atributos
3+
element.getAttribute('attribute')
4+
element.setAttribute('attribyte',value)
5+
6+
Clases
7+
element.classList.add('class,class,....)
8+
element.classList.remove('class','class',...)
9+
element.classList.toggle('class',[,force])
10+
11+
12+
13+
*/

0 commit comments

Comments
 (0)