K
Size: a a a
K
PP
PP
PP
V
V
document.getElementById('input').value = input1.value;
•
•
G
•
AA
•
•
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div id="container">
<input id="add-item-btn" type="button" value="+">
</div>
<script>
let click = document.getElementById('add-item-btn')
let cif = 0
click.onclick = () => {
cif++
let cont = document.querySelector('#container')
let div = document.createElement('div')
let c = document.createTextNode(`Element ${cif}`)
let button = document.createElement('button')
let button_text = document.createTextNode('×')
div.appendChild(c)
button.appendChild(button_text)
div.appendChild(button)
button.classList.add('button1')
div.classList.add('dialog')
cont.appendChild(div)
setTimeout(() => {
cont.removeChild(div)
}, 5000)
}
let click2 = document.querySelectorAll('button')
click2.onclick = () => {
console.log(click2)
let div = document.getElementsByClassName('dialog')
div.classList.remove('dialog')
div.classList.add('vanish')
}
</script>
</body>
</html>
•
В-
В-
const response = await axios({
method: 'GET',
url: link,
responseType: 'stream',
headers: {
'Cache-Control': 'no-transform',
'User-Agent':
'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)',
'Accept-Encoding': 'gzip',
},
});
console.log(saveFilePath);
const writer = fs.createWriteStream(saveFilePath);
response.data.pipe(writer);
writer.on('data', (chunk) => {
console.log('chunk', chunk);
});
await new Promise((resolve, reject) => {
writer.on('finish', resolve);
writer.on('error', reject);
});
};
v
v