Анатолий Пивоварский 1 year ago
parent
commit
dcbe2abb54
4 changed files with 40 additions and 2 deletions
  1. 1 0
      HW 2/HW 2 p2/js/script.js
  2. 1 1
      HW 3/js/script.js
  3. 1 1
      HW 4/js/script.js
  4. 37 0
      HW 6/index.html

+ 1 - 0
HW 2/HW 2 p2/js/script.js

@@ -169,3 +169,4 @@ else if (user === 3 && npc ===3 || user === 2 && npc === 1 || user === 3 && npc
 else {
    alert("ничья!")
 }
+

+ 1 - 1
HW 3/js/script.js

@@ -146,4 +146,4 @@ for(y = 0;y < 12;y++){
 str2 += '.'} 
     else {
 str2 += '#'}}}
-console.log(str2)
+console.log(str2)

+ 1 - 1
HW 4/js/script.js

@@ -111,4 +111,4 @@ for(let i = 0; i < 4; i++){
 }
 strColor +="</table>";
 console.log(strColor);
-document.write(strColor);
+document.write(strColor);

+ 37 - 0
HW 6/index.html

@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>Document</title>
+</head>
+<body>
+    
+</body>
+<script>
+    let table = document.createElement("table");
+    for (let i = 1; i < 10; i++){
+        let tr = document.createElement("tr");
+    for (let a = 1; a < 10; a++){
+        let td = document.createElement("td");
+        td.innerText = a * i;
+        td.style.border = '2px solid #d3d3d3'
+        td.style.padding = '20px'
+        td.style.fontSize = '20px'
+        td.style.textAlign = 'center'
+        tr.appendChild(td);
+        td.onmouseover = function(){
+            this.style.backgroundColor = "red"
+        }
+        td.onmouseout = function () {
+            this.style.backgroundColor = 'white'
+        }
+    } 
+    table.appendChild(tr)   
+    }
+    document.body.appendChild(table);
+        
+ 
+</script>
+</html>