Creating scripts in LiveCycle Designer ES using JavaScript is very similar to creating JavaScript in other applications. You can take advantage of previous knowledge of JavaScript concepts, reuse JavaScript functions using the LiveCycle Designer ES script object, and take advantage of JavaScript language functionality.
However, it is important to note that while previous JavaScript knowledge is transferable, to effectively use JavaScript on your form design you must understand how to construct LiveCycle Designer ES reference syntax. Specifically, you must be able to correctly use the XML Form Object Model reference syntax to access objects on your form design.
The following table outlines the key concepts for developing scripts in JavaScript for LiveCycle Designer ES, as well as where to find more information on each concept within the LiveCycle Designer ES Help.
Creating references to object properties and values, including using the resolveNode method.
In addition to the resources available in the LiveCycle Designer ES Help, the LiveCycle ES Developer Center contains extensive scripting resources and documentation. The developer center is located at www.adobe.com/devnet/livecycle/.
See also 

Creating scripts using JavaScript