Dit2210 Internet Programming Reg Supp
Dit2210 Internet Programming Reg Supp
Dit2210 Internet Programming Reg Supp
h) How can we validate fields of form? Explain form validation with example.
(4 Marks)
i) Write JavaScript code that allows you to go back or forward to pages in the
history list. By use of two buttons as shown below (5 Marks)
j) Explain how to write and call user defined function with its example. (2 Marks)
Section Two
Question Two
b) Using a function, Write JavaScript code that can be used to validate the contents
entered in the Age and Email textbox. Age must be a number and both text
boxes should not be empty. The email entered should be valid. (8 Marks)
b) Using examples, Discuss the three main types of loops used in JavaScript.
(9 Marks)
c) Write JavaScript code to display Good morning, Good afternoon, Good evening
depending upon the system time. (6 Marks)
Question Three
c) Differentiate between client side scripts and server side scripts (4 Marks)
Question Four
a) What are functions and How are functions useful in JavaScript? (3 Marks)
b) Using examples explain alert, prompt and confirm dialog boxes. (6 Marks)