Question
Develop a Javascript application that allows the user to enter strings into a variable number of input widgets. As a string is entered by the
Develop a Javascript application that allows the user to enter strings into a variable number of input widgets. As a string is entered by the user its length is automatically displayed next to the input widget. Buttons are provided to control the interface and to provide some functionality.
Clicking Add Cell button will add another input widget.
Clicking Remove Cell button will remove an input widget, always leaving at least one input widget.
Clicking Sort button will cause the visible strings to be sorted.
Organize the application in two files: the HTML file that is the user interface to the application; a file with most of the Javascript code;
Basic screen with simple styling
Provide styling that will approximately center the visible components. Also, change the default color for the background.
Add cell/Remove cell
As a convenience to the user, the application will remember the string entered into a widget even after the widget is removed.
If the widget is added back again, then the saved value will be displayed in the widget.
Typing and Length
Every time a user types a key, it checks and shows the length of a string in each widget on the next (in a real-time manner).
Sorting
Be careful, the saved strings do not participate in a sort operation if not visible.
You can use array sort() method.
If possible can you make it simple as possible and do the javascript in it own file, not in the html file. No need for CSS. Thanks!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started