Landing : Athabascau University

Unit 5 Zipped file and diary

  • Public
By CHENXIN ZHANG May 19, 2022 - 1:26pm

This unit is about witting JavaScript in the website.  After running through many ideas in my head, I decided to add these three features in my web:

 

  1. True form validation.

Since the previous version(unit4) Only can detect if the user entered something or not. I decide to let the program detect other things: For names, The user can only enter standard alphabet letters, all over special characters will be warned. Phone number can only take numbers. And there is also a “badword” Detector at the input section.

 

  1. Investment simulation

Once the user click the button under the “stocks” page. The code will calculate a random number and added to its initial values, and a for loop is used so the number will be changed multiple times and added to previous itself. Thus the user can experience how volatile the stock market is

 

  1. Shopping cart:

From this website: https://code-boxx.com/simple-vanilla-javascript-shopping-cart/  I learned how a shopping cart works. With modifications, I turned this cart to a shopping cart that allows the user to save the product they want to purchase. 

Comments

These comments are moderated. Your comment will not be visible unless accepted by the content owner.

Only simple HTML formatting is allowed and any hyperlinks will be stripped away. If you need to include a URL then please simply type it so that users can copy and paste it if needed.

(Required)

(Required)