document.addEventListener('DOMContentLoaded', function() { var buttons = document.querySelectorAll('.bnt'); buttons.forEach(function(button) { button.addEventListener('click', function() { window.open('films.html', '_blank'); }); }); });