1
0

script.js 326 B

123456789101112131415
  1. var modal = document.getElementById('myModal');
  2. var btn = document.getElementById("settings");
  3. btn.onclick = function() {
  4. modal.style.display = "block";
  5. }
  6. window.onclick = function(event) {
  7. if (event.target == modal) {
  8. console.log(event.target);
  9. modal.style.display = "none";
  10. }
  11. }