CISC 1100: Dynamic Web Page (with JavaScript)
Web developers use three main languages/tools: HTML, CSS and JavaScript.
- HTML(HyperText Markup Langauge): a standard markup language for web pages.
- CSS (Cascading Style Sheets): used for describing the look and formatting of a document written in a markup langauge (such as HTML).
- JavaScript: a programming language commonly used as part of web browers to allow client-side scripts.
We focus on JavaScript, a scripting language to write program that is
embeded in HTML web page. Here are key things to know about
this langauge:
- JavaScript code It's intrepreted and executed by the web browser.
- It's usually used to provide some dynamic contents in the
webpage.
Here are some resources to learn more about JavaScript language:
To get something up and running quickly, you can learn from examples, and then adapt the examples to suit your needs.
The following is a list of interesting examples that you can experiment with:
- Add some gadgets
- JavaScript: Input and Output
- JavaScript for Calculation #1
- JavaScript for Calculation #2
- Flip coins
- Slide show
- Requirements (to earn extra credits for the web project):
- In your index.html (i.e., main web page), add a date and time display, or add a last modification time (at the bottom of the webpage).
- Create another page (named formula.html), in this page, use HTML form and JavaScript to allow the user to enter some input (such as name, a number) and then write some output
to the webpage (such as a greeting message, converting the number in some way such as
unit conversion). Some ideas are provided below:
- Conversion from Farenheite to celsius and/or vice versa
- Calculation of P(n,r) or C(n,r) given the n, r that user inputs
- Other math formula of your choice
- Add a hyerlink in index.html to the above formula.html.