CIT484-2020
CIT484-2020
1(a) Distinguish between the Internet and the Web. Explaining whether or not it is possible for
one of them to exist without the other. (3 Marks)
(ii)When you use a heading tag in a document, outline what the Web browser assumes?
(2 Marks)
(c) As a student of CIT484, a web design class, you have been asked to create a login page as
shown in figure 1. The form should be processed by http://localhost/webpages/test.js and it should
be sent via the Get method.
i. Write the HTML codes that creates the form as shown in figure 1 (8 marks)
ii. Write a JavaScript code to validate username and password for the login form in 1(c).
If username and password are correct then show message “welcome to the world of
web design” If either username or password is not correct then show message “Invalid
Username or password” (6 marks)
iii. Write JavaScript code to disallow user from submitting empty value(s) using the form
in Figure 1 (4 marks)
2 (a) Create HTML document that has two frames in one row. The left frame must have at least
two links to other documents which are displayed in the right frame. The links must be the names
of lecture rooms in School of Science and the documents describe the location of the lecture
rooms. (9 marks)
3(a) There are times when a list box makes more sense than a text box, or when it's easier to use a
series of radio buttons as opposed to a series of check boxes. Discuss the following form field
type and what circumstances each form field type is best suited for.
(i)List box (ii) Check box (iii) Radio button (iv)Text Boxes (v)TextArea (10 marks)
(b) Which of the following object names are valid in JavsScript? For each one that is invalid,
explain why.
i. lastname ii. Company-name iii. 1stLineAddress iv. Zip code v. today’s date (5 marks)
(i) Fieldset (ii). Legend (iii). Maxlength (iv). Label (V). Action (5 marks)
(c) Write a JavaScript codes that makes the text “Hello from me” to be display as shown in the
form when you click on the “DisplayMessage” button (5 marks)
5(a) (i) Write HTML code that will add mp3 music to a webpage, the song should play three
times and then stop (2 marks)
(ii) Write a general HTML code that make a picture called “noun” as background of a webpage.
(2 marks)
(iii) Write HTML code to allow someone send mail to you by just clicking on the text. (2 marks)
(iv) Write HTML code that would make the text “Welcome to my world!” scroll from bottom to
top (2 marks).
(v) Write HTML code that would make all the link in the webpage red instead of the default
colour blue (2 marks)
(b) Write a JavaScript program to print the system current time in HH:MM:SS format as shown:
The current time is 12:45:25 (5 marks)