Web Programming

Coding Web Page

The objective of this exercise is to provide a web page that allows a text to be encoded with different codings.


  1. Export the coding objects of the script codings.js as an ES6 module.
  2. Write a web page codings.html that imports a JavaScript module main.js and contains an input field, a selection list of codings, and a button.
  3. Implement the JavaScript module main.js that imports the coding objects and registers an event listener on the button which reads the text of the input field, encodes it with the selected coding and displays the encoded text.
  4. (Optional) If the Morse coding is selected, display an additional button with which the generated Morse can be played using the script morse.js.