You can access the Contact Form Button with JavaScript by setting the CSS Class.

css-class-form-button.png

Example code:

<script>
  document.addEventListener("DOMContentLoaded", function () {
    const btn = document.querySelector('.name1');

    btn.addEventListener('click', function (event) {
      const answer = prompt('Are you sure?', 'Yes');

      if (answer !== 'Yes') {
        event.stopImmediatePropagation();
      }
    });
  });
</script>