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.
Tasks
-
Export the coding objects of the script codings.js as an ES6 module.
-
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.
-
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.
-
(Optional) If the Morse coding is selected, display an additional button with which the generated Morse code can be played using the script morse.js.
Solution