请参考以下代码:
JavaScriptAction javascipt_action = new JavaScriptAction(Action.create(page.getDocument(),
Action.e_TypeJavaScript));
javascipt_action.setScript("app.alert(\"Hello Foxit \");");
AdditionalAction aa = new AdditionalAction(annot);
aa.setAction(AdditionalAction.e_TriggerAnnotMouseButtonPressed, javascipt_action);
aa.doJSAction(AdditionalAction.e_TriggerAnnotMouseButtonPressed);