Acrobat JS is an API control engine designed to talk to PDF documents, forms and the user interface. It has no concept of the HTML document object model, so the functions you would use in a Web script are meaningless. There's no idea of "elements" for example.
My main goal is to avoid 1) naming the event button by button in Acrobat and 2) have one function that will work equally for the multiple forms I create.
Many thanks for your prompt assistance.
What you can do, if you develop both, HTML forms and PDF forms, is to separate everything user interface-related from the raw (core) functions. The core functions can be used in either place, if their arguments are neutral, and you define them accordingly in your respective documents.
For heavy duty application, you might look at a rather high-end forms design tool, OneForm Plus by Amgraf, which does create PDF forms and HTML forms from the same document, and is pretty good when it comes to the look of the forms. It also creates back-end code which is used to process submitted data. It is then also possible to have hybrid workflows when data gets displayed in PDF, and in HTML in the subsequent step and vice versa.
Hope this can help.