I like the traditional "Hello World" examples, that’s what I look for when ever I start coding in a new language, framework or library; so I’ll give the reader a "Hello World" example.
So open up your favorite text editor and the following self-explanatory code to HelloWorld.js
//Say Hello World
cName: "helloWorldBtn", // A name for your button
cExec: "helloWorld()", //Function to Call
cLabel: "Hello World", //The Text on the Button
cTooltext: "Say Hello World" //The Help Text
Drop the HelloWorld.js to:
Restart Acrobat and open-up any PDF and you should see the following button added to the tool-bar.
Clicking on the button you should see your Hello World alert.