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

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>