how do i click all href javascript links with javascript or jquery : 

I have multiple codes on my website like these below, I'm trying to make a small javascript piece of code or jquery that will automatically click all of these hrefs and do the deleteXY functions with the correct numbers.

    <li><a href="javascript:deleteXY(4)">Delete</a></li>
    <li><a href="javascript:deleteXY(6)">Delete</a></li>