<a onclick=”return confirm(‘Are you sure you want to delete?’)” href=”page.page?act=delete&id=1″>Delete</a>
You can see above example. The method is very easy.? if you click OK.. then function will return true and browser navigate href URL otherwise false value will be return and your click will not work.
You can achieve same functionality by wraping above method in a function.