I'm not sure if you want to limit the action somehow, but getting all anchor elements in the page is easy:
var links = document.getElementsByTagName('a');
If you want to limit your search inside an element, set an id on that element so that you can easily find it, and use the getElementsByTagName
on the element:
var links = document.getElementById('menu').getElementsByTagName('a');