Good afternoon, when I click on a button it opens a window.confirm obviously it has an OK and CANCEL, I would like to know if there is a way I can click this OK button once it opens with javascript?
HMTL
<a href="/excluir/recado/5735526/b3dd743495e9e826c7703b7f3d26a545" onclick="if(!confirm('Tem certeza que deseja excluir esse recado?')) return false;" class="btn-orkut">excluir<*a>
Javascript:
document.getElementsByTagName("a")[0].click();
The javascript works fine, but as default opens the confirm window, and in that I have to stay clicking OK I would like to know if there is this possibility of javascript being clicked OK. grateful