add dynamic page button to "each" another page's anker

hello
I want to add a button on dynamic page for go back to each anker.
example:
1page - anker1, anker2, anker3…
dynamic page - page1, page2, page3 and button to “each anker”

how can I code it?