IS
Size: a a a
IS
IS
IS
IS
IS
IS
IS
IS
Р
IS
IS
И
O
А
BB
И
И
/* When the user clicks on the button,Как сделать что бы при нажатии на эту же кнопку еще к #dropbtn добавлялся класс "фокус"?
toggle between hiding and showing the dropdown content */
function myFunction() {
document.getElementById("myDropdown").classList.toggle("show");
}
// Close the dropdown if the user clicks outside of it
window.onclick = function (e) {
if (!e.target.matches('#dropbtn')) {
var myDropdown = document.getElementById("myDropdown");
if (myDropdown.classList.contains('show')) {
myDropdown.classList.remove('show');
}
}
}
И