0% found this document useful (0 votes)
108 views

Css - Question Bank

Uploaded by

Jay Kadlag
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
108 views

Css - Question Bank

Uploaded by

Jay Kadlag
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 16

Course Name: Client Side Scripting Lang.

(22519)

Question Bank

Unit – I Basics of JavaScript Programming (Marks: 12)

Remember level Understand level Apply level

4 4 4
2 marks

1. State the features of Javascript


2. Write a javascript program to check whether entered number is prime or not.
3. List & explain datatypes in JavaScript
4. Write a JavaScript program that will print even numbers from 1 to 20
5. Write a simple calculator program using switch case in JavaScript.
6. Describe property Getters & Setter.
7. List the comparison operators in Java script.
8. Write a Java script to create person object with properties firstname, lastname, age,
eyecolor, delete eyecolor property and display remaining properties of person object
9. State the ways to display the output in JavaScript.
10. List the logical operators in JavaScript with description.
11. Write JavaScript to create a object "student" with properties roll number name, branch,
year. Delete branch property and display remaining properties of student object.
12. List various assignment operators supported by JavaScript, explain any two with the
help of suitable example.
13. State the use of dot syntax in JavaScript with the help of suitable example.
14. List and explain Logical operators in JavaScript
15. Write a javascript program to check whether the number is positive,negative or zero
using switch case
16. Give syntax of and explain the use of “with” statement/clause in JavaScript using
suitable example.
17. Write a JavaScript that displays first 20 even numbers on the document window.
18. State use of getters and setters
19. State meaning of each token of the following statement and describe it
++a; document.bgcolor

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.

The grades are computed as follows:

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)

Remember level Understand level Apply level

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()

25. Differentiate between prompt() and alert() methods.


26. State and explain any two properties of array object.
27. Write a JavaScript that initializes an array called “Fruits” with names of five fruits.
The script then displays the array in a message box.
28. Enlist and explain the use of any two Intrinsic JavaScript functions.
29. Write syntax of and explain prompt method in JavaScript with the help of suitable
example
30. Write a JavaScript function to insert a string within a string at a particular position
31. Write a JavaScript function that checks whether a passed string is palindrome or not.
4 marks
32. Differentiate between concat() and join() methods of array object.
33. Write an HTML script that accepts Amount, Rate of Interest and Period from user.
When user submits the information a JavaScript function must calculate and display
simple interest in a message box. (Use formula S.I. - PNR/100)
34. Write a JavaScript that accepts user's first name and domain name of organization
from user. The JavaScript then forms email address as <firstname@domain name and
displays the results in the browser window.
35. Differentiate between substring() and substr() method of a string class. Give suitable
example of each.
36. Explain associative arrays in details
37. Write java script function that checks whether passed string is palindrome or not
38. Explain how to add and sort elements of array with suitable example
39. Write a JavaScript program that will display list of student in ascending order
according to the marks & calculate the average performance of the class.

Student Marks
Name
Amit 70
Sumit 78
Abhishek 71

40. Write a javascript program to demonstrate java intrinsic function.


41. Write and explain a string functions for converting string to number and number to
string.
42. Differentiate between concat( ) & join( ) methods of array object.
43. Write a JavaScript function to check the first character of a string is uppercase or not.
44. Write a JavaScript function to merge two array & removes all duplicate values.
45. Write a JavaScript program that will remove the duplicate element from an array.
46. Write a javascript function that accepts a string as a parameter and find the length of
the string. Write the use of chatAt() and indexof() with syntax and example
47. Differentiate between concat() and join() methods of array object
48. Write a JavaScript that will replace following specified value with another value in
string.
a. String = “I will fail” Replace “fail” by “pass”
49. Write a Java Script code to display 5 elements of array in sorted order
50. Write the use of charCodeAt() and from CharCode() method with syntax and example.
51. Write JavaScript code to perform following operations on string. (Use split() method)
Input String: “Sudha Narayana Murthy”
Display output as
First Name: Sudha
Middle Name: Narayana
Last Name: Murthy
52. Explain splice() method of array object with syntax and example.
53. Differentiate between push() and join() method of array object with respect to use,
syntax, return value and example.
54. Differentiate between concat() and join() methods of array object.
Sample paper
55. Write a JavaScript function to count the number of vowels in a given string
56. Write a JavaScript that find and displays number of duplicate values in an array.
57. 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 .
58. Develop JavaScript to convert the given character to Unicode and vice versa.

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)

Remember level Understand level Apply level

2 4 4
2 marks

1. Explain following form events : (i) onmouseup (ii) onblur


2. Enlist any four mouse events with their use.
3. Write a Java script to design a form to accept values for user ID & password.
4 marks
4. Write a javascript program to calculate add, sub, multiplication and division of two
number (input from user). Form should contain two text boxes to input numbers of
four buttons for addition, subtraction, multiplication and division.
5. Write a JavaScript function that will open new window when the user will clicks on
the button.
6. Write a Java script to modify the status bar using on MouseOver and on MouseOut
with links. When the user moves his mouse over the links, it will display “MSBTE” in
the status bar. When the user moves his mouse away from the link the status bar will
display nothing.
5 marks
7. Write HTML code to design a form that displays two textboxes for accepting two
numbers, one textbox for accepting result and two buttons as ADDITION and
SUBTRACTION. Write proper JavaScript such that when the user clicks on any one
of the button, respective operation will be performed on two numbers and result will
be displayed in result textbox.
8. Write an HTML Script that displays the following webpage output:
The user enters two numbers in respective text boxes. Write a JavaScript such that when
user clicks “add”, a message box displays sum of two entered numbers, if the user clicks
on “sub”, message box displays subtraction of two numbers and on clicking “mul” the
message box displays multiplication of two numbers.

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])

20. Write HTML and respective java script such that


i)webpage displays three check boxes as:.
Select beverage: Tea

Coffee

Soft drink

II)When beverage is selected a drop down list with options as below appears on page

a) if TEA option is checked dropdown list contains

Green tea
Milk tea
Black tea

b) if COFFEE option is checked dropdown list contains

Capaccino
Latte
Expresso

c) if SOFT DRINK option is checked dropdown list contains

Maaza
Sprite
Coca-cola
UNIT-IV Cookies and Browser Data (Marks: 08)

Remember level Understand level Apply level

2 2 4

2 marks

1. Differentiate between between session cookies and persistent cookies.


2. With the help of suitable example explain the Date object and any two methods of Date
object.
3. Explain the term JavaScript URL
Sample paper
4. Write a JavaScript that identifies a running browser.
5. State and explain what is a session cookie?
4 marks
6. Design a webpage that displays a form that contains an input for user name and
password. User is prompted to enter the input user name and password and password
become value of the cookies. Write the javascript function for storing the cookies.
7. Write a javascript program to create read, update and delete cookies.
8. Explain how to create and read Persistent Cookies in JavaScript with example.
9. Write HTML code to design a form that displays two buttons START and STOP. Write
a JavaScript code such that when user clicks on START button, real time digital clock
will be displayed on screen. When user clicks on STOP button, clock will stop
displaying time. (Use Timer methods)
10. State what is a cookie? Explain its need. State characteristics of persistent cookies.
11. List and state various properties of a window object. Write a JavaScript that opens a
new popup window with message “WELCOME TO SCRIPTING” when the page loads
and a new popup window displaying message “FUN WITH SCRIPTING” when the
page unloads.
12. Give syntax of and explain the use of SetTime Out() function with the help of suitable
example.

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)

Remember level Understand level Apply level

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.

5. Write a javascript syntax to accessing elements of another child window.


6. Write a script for creating following frame structure

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

30. Design the frameset tag for following frame layout :

FRAME1

FRAME2

FRAME3
4 marks

31. Write a JavaScript for creating following frame structure :

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.

(ii) Validation of adhaar card. Format is

(iii) Validation of phone number. Format is (ddd) - (dddddddd)


34. When user clicks MUSIC button,music.html webpage will appear in Frame 3. When user
clicks DANCE button,dance.html webpage will appear in Frame 4.Write a script for
creating following frame structure Frame I contains three buttons SPORT, MUSIC and
DANCE that will perform following action: When user clicks SPORT button, sport.html
webpage will appear in Frame 2.

FRAME 1
SPORT MUSIC DANCE
6 marks
FRAME 2 FRAME 3 FRAME 4

Unit 6: Menus, Navigation and Webpage Protection (Marks :12)

Remember level Understand level Apply level

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

10. Write a javascript program to link banner advertisements to different URLs.


11. Describe browser location object.
12. Write a JavaScript program that will create pull-down menu with three options. Once
the user will select the one of the options then user will redirected to that website.
13. State any two properties and methods of location object.
14. Explain process to create status bar in java script
15. State the use of hiding the JavaScript. Explain the steps needed to accomplish it and
describe the process.
16. What is Status bar and how to display moving message on the status line of a window
using JavaScript?
17. Explain the term browser location and history in details
18. Explain steps to create floating menu and chain select menu
19. Explain how to use banners for displaying advertisement
20. Write a JavaScript program that creates a scrolling text on the status line of a window.
21. List ways of protecting your web page and describe any one of them.
22. Create a slideshow with the group of three images, also simulate next and previous
transition between slides in your Java Script.
23. Write a Java script to modify the status bar using on MouseOver and on MouseOut
with links. When the user moves his mouse over the link, it will display “MSBTE” in
the status bar. When the user moves his mouse away from the link the status bar will
display nothing.
6marks

24. Describe how to link banner advertisement to URL with example.


25. Write JavaScript for protecting web page by implementing the following steps
i)Hiding your source code
ii)Disabling the right MouseButton
iii Hiding JavaScript

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.

You might also like