As for the anchors - I do not know.
But as for the buttons, here’s a short tutorial on how to do it:
Code:
$w.onReady(function () {
const buttons = $w('Button');
console.log(buttons);
buttons.forEach(button => {
if (button.link === '') {
console.log(button.label)
}
});
});