Css - Question Bank
Css - Question Bank
(22519)
Question Bank
4 4 4
2 marks
4 marks
1. Write a javascript program to validate user accounts for multiple set of user ID and
password (using switch case statement).
2. State the use of object property and methods in java script
3. Explain getter and setter in javascript with the help of example
4. Write a JavaScript that accepts a number and displays addition of digits of that number
in a message box.
5. Explain getter and setter properties in Java script with suitable example
Write a JavaScript that displays first 20 even numbers on the document window.
6. Differentiate between For-loop and For-in loop
7. Write a JavaScript for loop that will iterate from 1 to 15. For each iteration, it will
check if the current number is odd or even and display a message to the screen.
Sample Output:
“1 is odd"
"2 is even”
8.
9. Write a JavaScript program which compute, the average marks of the following
students Then, this average is used to determine the corresponding grade.
10. Explain Object creation in JavaScript using 'new' keyword with adding properties and
methods with example.
11. Give syntax of and explain for-in loop in JavaScript with the help of suitable example.
12. Write a program to print sum of even numbers between 1 to 100 using for loop
6 Marks.
Unit – II Array, Function and String (Marks :14)
2 4 8
2marks
1. Write a JavaScript that initializes an array called “Fruits” with names of five fruits.
The script then displays the array in a message box.
2. List and describe any four methods of Math object
3. Write and explain syntax of prompt() method in JavaScript.
4. Write a JavaScript program to display the elements of array in ascending and
descending order
5. Give syntax of and explain function in JavaScript with suitable example
6. Write a JavaScript function that checks whether a passed string is palindrome or not
7. State the meaning of "Defining a function". Explain with the help of an example.
8. Write a JavaScript function to count the number of vowels in a given string.
9. Write a function that prompts the user for a color and uses what they select to set the
background color of the new webpage opened.
10. Develop JavaScript to convert the given character to Unicode and vice versa.
11. State and explain any two properties of array object
12. Write a JavaScript function to insert a string within a string at a particular position
13. Write a Java script that initializes an array called flowers with the names of 3 flowers.
The script then displays array elements.
14. Write Javascript to call function from HTML.
15. Give syntax of and explain the use of small "with" clause.
16. Differentiate between shift() and push() methods of an Array object.
17. Write the use of chatAt() and indexof() with syntax and example.
18. Write a Java Script code to display 5 elements of array in sorted order.
19. State the use of method in JavaScript with the help of suitable example.
20. Write a program using sort method of array object.
21. Write a JavaScript that initializes an array called Colors with the names of Colors and
display the array elements.
22. Explain calling a function with arguments in JavaScript with example.
Sample paper
23. Describe all the tokens of the following statements :
i. document.bgColor
ii. document.write()
24. State the use of following methods.
i. charCodeAt()
ii. fromCharCode()
Student Marks
Name
Amit 70
Sumit 78
Abhishek 71
4 marks
59. Write a javascript function to generate Fibonacci series till user defined limit.
60. Develop javascript to convert the given character to unicode and vice-versa.
61. Write a javascript to checks whether a passed string is palindrome or not.
Unit –III Form and Event Handling (Marks: 10)
2 4 4
2 marks
9. Write a javascript to create option list containing list of images and then display
images in new window as per selection.
10. List and explain any six form events
11. Enlist and explain any two mouse events.
12. Explain how to evaluate Radiobutton in JavaScript with suitable example
13. Write a HTML script which displays 2 radiobuttons to the users for fruits and
vegetable and 1 option list. When user select fruits radio button option list should
present only fruits names to the user & when user select vegetable radio button option
list should present only vegetable names to the user.
14. Describe how to evaluate checkbox selection. Explain with suitable example.
15. Write a HTML script which displays 2 radio buttons to the users for fruits and
vegetables and 1 option list. When user select fruits radio button option list should
present only fruits names to the user & when user select vegetable radio button option
list should present only vegetable names to the user
16. Write HTML script that will display dropdown list containing options such as Red,
Green, Blue & Yellow. Write a JavaScript program such that when the user selects
any options. It will change the background colour of webpage.
17. Explain following form control elements with example Button, Text, TextArea. Select
Checkhox, Form
18. Write HTML script that display textboxes for accepting username and password.
Write proper java script such that when the user clicks on submit button
i)All textboxes must get disabled and change the color to RED and with respective
labels
ii)Prompt the error message if the Password is less than six characters
Sample paper
19. Write HTML Script that displays textboxes for accepting Name, middlename,
Surname of the user and a Submit button. Write proper JavaScript such that when the
user clicks on submit button i) all texboxes must get disabled and change the color to
“RED”. And with respective labels. 3 ii) Constructs the mailID as [email protected] and
displays mail ID as message. (Ex. If user enters Rajni as name and Pathak as surname
mailID will be constructed as [email protected])
Coffee
Soft drink
II)When beverage is selected a drop down list with options as below appears on page
Green tea
Milk tea
Black tea
Capaccino
Latte
Expresso
Maaza
Sprite
Coca-cola
UNIT-IV Cookies and Browser Data (Marks: 08)
2 2 4
2 marks
Sample paper
13. Write a JavaScript that displays all properties of window object. Explain the code .
14. Write the syntax of and explain use of following methods of JavaScript Timing Event.
a. setTimeout() b. setInterval()
15. Generate college Admission form using html form tag .
16. Write a JavaScript that creates a persistent cookies of Itemnames. Write appropriate
HTML script for the same.
6 marks
17. Describe, how to read cookie value and write a cookie value. Explain with example
18. Write a webpage that displays a form that contains an input for username & password.
User is prompted to enter the input & password & password becomes the value of the
cookie.
19. Write a JavaScript function for storing the cookie. It gets executed when the password
changes.
20. Write a webpage that displays a form that contains an input for students rollno and
names. user is prompted to enter the input student rollno and name and rollno and
name becomes value of the cookie
21. Write a webpage that diplays a form that contains an input for Username and password.
User is prompted to enter the input and password and password becomes value of the
cookie. Write The JavaScript function for storing the cookie . It gets executed when the
password changes.
UNIT-V Regular Expression, Rollover and Frames (Marks :14)
2 6 6
4 marks
1. Describe regular expression. Explain search () method used in regular expression with
suitable example.
2. Explain text rollover with suitable example.
3. Write a Java script that displays textboxes for accepting name & email ID & a submit
button. Write Java script code such that when the user clicks on submit button (1) Name
Validation (2) Email ID validation
4. Write the JavaScript code for below operations:
Name, Email & Pin Code should not be blank.
Pin Code must contain 6 digits & it should not be accept any characters.
FRAME 1
FRAME 2 FRAME 3
• FRUITS
• FLOWERS
• CITIES
2 marks
7. Write a javascript program to changing the contents of a window.
4MARKS
8. Write a JavaScript program that will display current date in DD/MM/YYYY format.
9. State what is frame.Explain how it can be created with suitable example
10. List any three properties of regular expression objects and state their use.
11. Write a JavaScript that accepts a string and searches for the pattern "MSBTE" in the given
string using regular expressions. If the pattern is found, JavaScript will display that
"Pattern is found" else display "Pattern is not found".
12. Write an HTML script that displays names of different brands of Laptop and an image by
default as:
Lenova
HP Image
Dell
When the mouse moves over the specific brand name the script must display the image of
respective Laptop in the adjacent box.
13. Write a JavaScript in create rollover effect that involves text and images When the user
places his or her mouse pointer over a book title, the corresponding book image appears.
14. Describe Quantifiers with the help of example.
15. Describe text Rollover with the help of example
16. Write HTML code to design a form that displays textboxes for accepting UserID and
Aadhar No. and a SUBMIT button. UserID should contain 10 alphanumeric characters
and must start with Capital Letter. Aadhar No. should contain 12 digits in the format nnnn
nnnn nnnn. Write JavaScript code to validate the UserID and Aadhar No. when the user
clicks on SUBMIT button
17. Write a Java script that displays textboxes for accepting name & email ID & a submit
button. Write Java script code such that when the user clicks on submit button (1) Name
Validation (2) Email ID validation
18. Construct regular expression for validating the phone number in following format only :
(nnn)-nnnn-nnnn OR nnn.nnnn.nnnn
19. State what is regular expression. Explain its meaning with the help of a suitable example.
20. . Write a webpage that accepts Username and adharcard as input texts. When the user
enters adhaarcard number ,the JavaScript validates card number and diplays whether card
number is valid or not. (Assume valid adhaar card format to be nnnn.nnnn.nnnn or nnnn-
nnnn-nnnn
21. Write a JavaScript function to check whether a given value is valid IP value or not
22. Write a JavaScript program to create rollover effect for three images.
23. Write a javascript program to validate email ID of the user using regular expression.
24. Describe regular expression. Explain search () method used in regular expression with
suitable example.
25. Explain test() and exec() method of Regular Expression object with example.
26. Explain open() method of window object with syntax and example.
27. Write a javascript program to design HTML page with books information in tabular
format, use rollovers to display the discount information
28. Explain text and image rollover with suitable example,
29. Design frameset tag to display following output
Frame 1
Frame2 Frame3 Frame4
FRAME1
FRAME2
FRAME3
4 marks
Chapter 1 & Chapter 2 are linked to the webpage Ch1 HTML & Ch2.html respectively.
When user click on these links corresponding data appears in FRAME3.
32. Write a javascript to open a new window and the new window is having two frames. One
frame containing button as “click here !”, and after clicking this button an image should
open in the second frame of that child window.
33. Form regular expressions for following:
(i) Validation of email address.
FRAME 1
SPORT MUSIC DANCE
6 marks
FRAME 2 FRAME 3 FRAME 4
2 4 6
1. Create a slideshow with the group of three images, also simulate next and previous
transition between slides in your Java script
2. Write a Javascript to create a pull – down menu with three options [Google,
MSBTE, Yahoo] once the user will select one of the options then user will be
redirected to that site.
3. Describe frameworks of JavaScript & its application.
4. Describe how to link banner advertisement to URL with example.
5. Develop a JavaScript program to create Rotating Banner Ads.
6. Write HTML script that will display dropdown list containing options such as
Red, Green, Blue and Yellow. Write a JavaScript program such that when the
user selects any options. It will change the background colour of webpage.
7. Write a JavaScript for the folding tree menu.
2 marks
8. State any four properties of Navigator object.
9. State the method to put message in web browser status bar?
4marks
26. Write a JavaScript to create a pull-down menu with four options [AICTE, DTE,
MSBTE, GOOGLE]. Once the user will select one of the options then user will be
redirected to that site.
27. Develop a JavaScript program to create Rotating Banner Ads. With URL links
28. Develop a JavaScript program to create Rotating Banner Ads.
29. Write a javascript to create a pull-down menu with three options [Google, MSBTE,
Yahoo] once the user will select one of the options then user will be redirected to that
site
30. Write a JavaScript for the folding tree menu
31. Write a javascript program to create a silde show with the group of six images, also
simulate the next and previous transition between slides in your javascript.
32. Write a JavaScript that demonstrates use of floating menu alongwith respective HTML
script.
33. Write a JavaScript that sets a crawling status bar message to the webpage. Message is
"Welcome to the Mystic World of JavaScript".The message must start crawling when
the webpage gets loaded.
6 marks
Sample paper
34. Write HTML Script that displays dropdownlist containing options NewDelhi, Mumbai,
Bangalore. Write proper JavaScript such that when the user selects any options
corresponding description of about 20 words and image of the city appear in table which
appears below on the same page.
35. Create a slideshow with the group of four images, also simulate the next and previous
transition between slides in your JavaScript.