Olga1108 4 년 전
부모
커밋
98e109e53f
2개의 변경된 파일23개의 추가작업 그리고 0개의 파일을 삭제
  1. 16 0
      js6.3/index.html
  2. 7 0
      js6.3/index.js

+ 16 - 0
js6.3/index.html

@@ -0,0 +1,16 @@
+!DOCTYPE html>
+<html lang='en'>
+    <head>
+        <meta charset='UTF-8' />
+        <meta name='viewport' content='width=device-width, initial-scale=1.0' />
+        <title>Home Work 6.3 JS</title>
+    </head>
+    <body>
+        <h1>Home Work 6.3</h1>
+        <ul>
+            <li>dog</li>
+            <li>cat</li>
+        </ul>
+        <script src='index.js'></script>    
+    </body>
+</html>

+ 7 - 0
js6.3/index.js

@@ -0,0 +1,7 @@
+// Task 6.3
+let elems = document.querySelectorAll('body > :not(script)')
+elems.forEach (function(elem) {
+    elem.classList.add ('redBack');
+    elem.setAttribute('style', `background-color: red!important`);
+    document.body.appendChild(elem)
+})