Here are some tasks to introduce you to JavaScript programming.
Tasks
- Consider the personal details application presented in
lab 2. Modify the implementation (1) to use
valid HTML5 that includes an email field, and (2) to perform
client-side input validation. More specifically, use JavaScript to
check that the name field is nonempty, that the email
field is indeed an email address, that a likes has
been selected, and that at least one dislikes has been selected. All
omissions should be reported in a single message in an alert box. Do
not duplicate code unnecessarily.
-
Repeat task 1 using jQuery.
-
Extend the JavaScript noughts and crosses program to play sensibly,
i.e., at least, win when it can win and block when its opponent
can win.
-
Seek advice and feedback on your working solution to Assignment 2.
Milestone
Complete Task 1.
The task - or something like it - is required for Assignment 2.