Skip to content

Commit fb38a13

Browse files
committed
minor
1 parent 902a7e7 commit fb38a13

File tree

1 file changed

+2
-2
lines changed
  • 2-ui/1-document/06-dom-attributes-and-properties

1 file changed

+2
-2
lines changed

2-ui/1-document/06-dom-attributes-and-properties/article.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ Here's an extended demo of working with attributes:
124124
125125
elem.setAttribute('Test', 123); // (2), writing
126126
127-
alert( elem.outerHTML ); // (3), see it's there
127+
alert( elem.outerHTML ); // (3), see if the attribute is in HTML (yes)
128128
129129
for (let attr of elem.attributes) { // (4) list all
130130
alert( `${attr.name} = ${attr.value}` );
@@ -260,7 +260,7 @@ Like this:
260260
for(let div of document.querySelectorAll('[show-info]')) {
261261
// insert the corresponding info into the field
262262
let field = div.getAttribute('show-info');
263-
div.innerHTML = user[field]; // Pete, then age
263+
div.innerHTML = user[field]; // first Pete into "name", then 25 into "age"
264264
}
265265
</script>
266266
```

0 commit comments

Comments
 (0)