moving all labs to old dir
This commit is contained in:
7
old/lectures/lec6/part1/part4.js
Normal file
7
old/lectures/lec6/part1/part4.js
Normal file
@@ -0,0 +1,7 @@
|
||||
document.getElementsByName("img").forEach((elem) => {
|
||||
if (elem.hasAttribute("width") && elem.hasAttribute("height")) {
|
||||
elem.removeAttribute("width");
|
||||
elem.removeAttribute("height");
|
||||
}
|
||||
elem.classList.add("pict");
|
||||
})
|
||||
6
old/lectures/lec6/part1/task1.js
Normal file
6
old/lectures/lec6/part1/task1.js
Normal file
@@ -0,0 +1,6 @@
|
||||
let elemList = document.getElementsByTagName("*")
|
||||
elemList.forEach(element => {
|
||||
if(element.children.length==3){
|
||||
console.log(element)
|
||||
}
|
||||
});
|
||||
5
old/lectures/lec6/part1/task2.js
Normal file
5
old/lectures/lec6/part1/task2.js
Normal file
@@ -0,0 +1,5 @@
|
||||
let elemList = document.getElementsByTagName("ol");
|
||||
|
||||
elemList.forEach(olElem => {
|
||||
olElem.children.forEach(child =>{child.display = "none";})
|
||||
});
|
||||
7
old/lectures/lec6/part1/task3.js
Normal file
7
old/lectures/lec6/part1/task3.js
Normal file
@@ -0,0 +1,7 @@
|
||||
document.getElementsByName("*").forEach((elem) => {
|
||||
for (attr in ["align", "width", "height"]) {
|
||||
if (elem.hasAttribute(attr)) {
|
||||
elem.removeAttribute(attr);
|
||||
}
|
||||
}
|
||||
})
|
||||
11
old/lectures/lec6/part1/task5.js
Normal file
11
old/lectures/lec6/part1/task5.js
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
const paragraphs = ['C++', 'C#', 'JavaScript'];
|
||||
const textDiv = document.getElementById('text');
|
||||
|
||||
let elemLink = textDiv.firstElementChild;
|
||||
paragraphs.forEach(paragraph => {
|
||||
const p = document.createElement('p');
|
||||
p.innerHTML = paragraph;
|
||||
textDiv.insertBefore(p, elemLink);
|
||||
elemLink = elemLink.nextElementSibling;
|
||||
});
|
||||
4
old/lectures/lec6/part1/task6.js
Normal file
4
old/lectures/lec6/part1/task6.js
Normal file
@@ -0,0 +1,4 @@
|
||||
const menu = document.getElementById('menu');
|
||||
while (menu.firstChild) {
|
||||
menu.removeChild(menu.firstChild);
|
||||
}
|
||||
Reference in New Issue
Block a user