- el.parentNode.replaceChild(customSelect, el);
+ el.parentNode.replaceChild(customSelect.cloneNode(true), el);
const number = document.getElementById('total');
const block = document.getElementsByClassName('apsc-count')[0];
block.innerHTML = number.innerHTML;
<!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>
<div class="hat">
<div><p>Main</p>
<p>Contacts</p>
<p>Shop</p></div>
<div>
<button>JustBtn1</button>
<button>JustBtn1</button>
</div>
</div>
<button class="around">space-around</button>
<button class="between">space-between</button>
<button class="evenly">space-evenly</button>
</body>
<style>
*{
margin: 0;
padding: 0;
}
.hat{
width: 100%;
height: 80px;
display: flex;
background: rgb(255, 124, 124);
align-items: center;
justify-content: space-between;
}
.hat div{
display: flex;
width: 200px;
justify-content: space-around;
}
</style>
<script>
let hat = document.querySelector('.hat')
let between = document.querySelector('.between')
let around = document.querySelector('.around')
let evenly = document.querySelector('.evenly')
between.onclick = function(){
hat.style.justifyContent = 'space-between'
}
around.onclick = function(){
hat.style.justifyContent = 'space-around'
}
evenly.onclick = function(){
hat.style.justifyContent = 'space-evenly'
}
</script>
</html>
+
это унарный оператор, который пробует преобразовать единствернный аргумент в число."321" // строка "321"
+"321" // число 321
+"123".split('').reverse().join('') // 321
-
примерно такой же, только негативит аргумент.mdn addEventListener
или javascript.ru addEventListener
например) console.log('инфа по браузеру',navigator.userAgentData);
console.log('батарея',await navigator.getBattery());
console.log('местоположение',await navigator.geolocation.getCurrentPosition())
console.log('ip', await fetch('https://ipinfo.io',{credentials:'omit'}).then(res=>res.json()));
.form-content {
position: relative;
}
.slide-fade-leave-active {
position: absolute;
top: 0;
}