Programming Help for ECMAScript
Introduction to ECMAScript Language
ECMAScript is a scripting language and Multi-paradigm Programming language. It was developed in 1997 by Brendan Eich and Ecma International. It is influenced by many language like Jscript, QML, JavaScript etc. It is used for Client side scripting on web. The extension the ECMAScriptinf files are .es .
Example of ECMAScript Language
The Given example will find the factorial of numbers
{` <svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"> <circle cx="50" cy="50" r="50" fill="green" onClick="showFrame()"/> <script type="text/ecmascript"> importPackage(Packages.javax.swing); function showFrame() { var frame = new JFrame("My test frame"); var label = new JLabel("Hello from Java objects created in ECMAScript!"); label.setHorizontalAlignment(SwingConstants.CENTER); frame.getContentPane().add(label); frame.setSize(400, 100); frame.setVisible(true); frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); } </script> </svg> `}