Does Elgg allow for button code outside of forms?

Quick question for you fine folks.
ive been working on a button for some thing, and will have to implement the same structure to it on a different page with the same information, however, this page is just a regular page rather than a form. Im not quite sure how elgg handles buttons outside of them, if I put all of my button code in a function, could I call that function on the click of said button?

Let me know if you guys have any info!