0% found this document useful (0 votes)
95 views2 pages

ASSIGNMENT 3 (Unit 4) : Web Programming (3160713) Hardik Patel

The document outlines 15 JavaScript assignments covering various topics: 1. List advantages of JavaScript and explain different types of pop-up boxes and event handling with examples. 2. Explain DOM with an example and write code to print a numeric pattern. 3. Create an HTML page that takes a number and determines if it is prime. The assignments cover additional JavaScript topics like events, DOM structure, form validation with regular expressions, and event handling.

Uploaded by

Justin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
95 views2 pages

ASSIGNMENT 3 (Unit 4) : Web Programming (3160713) Hardik Patel

The document outlines 15 JavaScript assignments covering various topics: 1. List advantages of JavaScript and explain different types of pop-up boxes and event handling with examples. 2. Explain DOM with an example and write code to print a numeric pattern. 3. Create an HTML page that takes a number and determines if it is prime. The assignments cover additional JavaScript topics like events, DOM structure, form validation with regular expressions, and event handling.

Uploaded by

Justin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

ASSIGNMENT 3 (Unit 4)

1. List some advantages of javascript.


2. Explain different types of pop box in JavaScript
3. Explain event handling in JavaScript with proper example.
4. Explain DOM with example
5. Write JavaScript code to print following pattern.

01

101

0101

10101

6. Create HTML Page with JavaScript which takes Integer number as input and tells whether the
number is Prime or Not.
7. What do you mean by event in JavaScript? Give at least two examples of events with their
handling.
8. Explain DOM structure of HTML. Write JavaScript code to know which mouse button was clicked
and number of elements in form.
9. Design a login form using HTML & JavaScript with following validations using Regular
Expression on username and password fields.

1. Username and Password should not be both blank

2. Username should not start with digit,_, @ or #

3. Password length must be 8 to 16 characters

10. Write a JavaScript program to validate an Email address.


11. Write a JavaScript that handles following events.

(i) Gives the key code for the key pressed.

(ii) The script should give message that "vowel is pressed" if vowel keys are pressed.

Web Programming (3160713) HARDIK PATEL


ASSIGNMENT 3 (Unit 4)

(iii) Background color should change to red after releasing the pressed key.

12. Design a login form with username and password option using HTML and JavaScript. Perform
following validations.

(i) Username field: minimum length 6 characters, it should not have any special character or digits
other than _

(ii) Password field: minimum length 8 characters and maximum length 12 characters, it must at
least one digit and at least one special character from the set {*,#,_}

13. Write a JavaScript that handles following events.

(i) If the mouse is over heading, change font color to “red” and if the mouse goes out of the heading
change it to “black”

(ii) If key pressed is ‘a’,’e’,’i’,’o’,’u’, the message should be displayed on pop up box that “vowel
is pressed”

(iii)If “Date and Time” button is clicked it displays current date and time information

14. Explain the Document Object Model. Explain any two document object with example.
15. Write a javascript to accept a number to check whether it is greater than 100 or not?

Web Programming (3160713) HARDIK PATEL

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy