This assignment demonstrats my skills using HTML form elements and JavaScript topics such as: Functions, parsing the DOM, form validation, conditional statements, debugging methods, formulas and Math Object.
- File Structure
Create two simple html pages.
Create an external JavaScript file: script.js.
Create an external Style Sheet file: styles.css.
The two HTML files, JS file, CSS file, plus the two subfolders have to be inside the assignment mainfolder named: “JS-Assignment-YourFirstName”e.g: JS-Assignment-Martin.

- Home Page
- You will create a web form to ask the user to enter the following information using the appropriateHTML5 form controls (elements) to represent each item in the list below:
- Excel Page
- Design a web form following the wireframe guidelines below. Notice that the image below is just asample so you can use any styles like colour, font, layout, width, or borders plus any HTML Tags that youprefer.
- User can type his/her numbers with a space between each number (as a string with the spacecharacter as a delimiter or space separated numeric values) inside an input box (You need to notifythe user to enter the numbers with a space between every two numbers as shown in the diagram).
- Then the user can choose only one of the basic excel functions (radio buttons) to do the requiredcalculation.
- When the button “Calculate” is clicked, a function named myExcelFuns() will be loaded (triggered) soyou will need to add “onClick” event to the form button “Calculate”, and inside myExcelFuns functionbody (block) you will have to do the following:
- Continuing inside myExcelFuns(), you will use if condition to scan or to check which radio button wasselected and based on this selection you will do the right calculations.
- There is more than one way to get the selected radio button option, one of them for example, is togive each radio button control an “id” in your HTML code:
<input type="radio" name="excel">AutoSum<input type="radio" name="excel">Average
- At the end of all the if else blocks (4 blocks), use the getElementById() method to print your result (thevalue of the result variable) into your specific HTML element.
This section lists the languages I used to built this project.
This project is downloadabe. If you would like to download this repo for personal use, feel free. Steps below:
- Click the green "Code" button above the file section.
- Click "Download Zip".
- Open your downloads file and extract.
- You're set!