http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/js_api_reference.pdf
page 446
However, I can't completely understand your problem.
JavaScript will run upon both
- a trigger event;
- page opening (which is actually an event too);
I don't think you will need JavaScript at page opening time because you would more appropriately set font size at design time.
You may need to increase/reduce font size if any other event happens: for example, if the end-user hovers the mouse over a text field, you may decide to change font size.
Another possible application may be an action. There, you may actually need JavaScript to set font size when filling in form fields for instance. So, you can differentiate font size according to which field is being filled in.
Hope it helps.