RSM Question Bank Css 22519 PDB
RSM Question Bank Css 22519 PDB
RSM Question Bank Css 22519 PDB
(22519)
Chapter Marks With
Name of chapter
No. Option
1 Basics of JavaScript 14
2 Array, Function and String 22
3 Form and Event Handling 18
4 Cookies and Browser 24
5 Regular Expression, Rollover and Frames 14
6 Menus, navigation and web page protection 16
Total Marks: - 108
Q.1 Attempt any FIVE 5*2=10
Course Outcome
Q.1 Attempt any FOUR 4*2=8Marks (CO)
a) Basics of JavaScript Programming CO-519.01
b) Basics of JavaScript Programming CO-519.01
c) Form and Event Handling CO-519.03
d) Form and Event Handling CO-519.03
e) Basics of JavaScript Programming CO-519.01
f) Array, Function and String CO-519.02
Q.2 Attempt any THREE 3*4=12 Marks
a) Form and Event Handling CO-519.03
b) Array, Function and String CO-519.02
c) Form and Event Handling CO-519.03
COURSE: - Client Side Scripting Language (22519)
PROGRAMME: - Computer Technology
Syllabus: -
Course Outcome (CO)
Unit No. Name of the Unit
Course Outcome
Q.1 Attempt any FOUR 4*2=8Marks (CO)
a) Cookies and Browser Data CO-519.04
b) Regular Expression, Rollover and Frames CO-519.05
c) Menus, navigation and web page protection CO-519.06
d) Menus, navigation and web page protection CO-519.06
e) Regular Expression, Rollover and Frames CO-519.05
f) Cookies and Browser Data CO-519.04
Q.2 Attempt any THREE 3*4=12 Marks
CO- 564.01 Create interactive web pages using program flow control structure
CO- 564.03 Create event based web forms using Java script
CO- 564.05 Create interactive webpage using regular expressions for validations.
Q.1. a) 2-Marks.
Q.1. b) 2-Marks.
Q.1. e) 2-Marks.
Q.2. a) 4-Marks.
Q.2. b) 4-Marks.
----------------------------------------------------------------------------------------------------------------
Descriptive Question
1. Explain any two/ four features of JavaScript?
2. Write a JavaScript to display Welcome message in JavaScript.
3. Explain the term – Object Name, Property, Method, Dot syntax, main event.
4. Explain six types of values in JavaScript.
5. What is conditional operator in JavaScript?
6. List the different types of operator in JavaScript. Describe any one in details.
7. List the different types of popup box. Explain any of it with example.
8. Write a JavaScript to display squares of 1 to 10 numbers using while loop.
9. Write a JavaScript program that accept two integers and display the larger.
10.Write a JavaScript conditional statement to sort three numbers. Display an alert box to
show the result.
11.Write a JavaScript for loop that will iterate from 0 to 15. For each iteration, it will
check if the current number is odd or even, and display a message to the screen.
12.Write a JavaScript conditional statement to find the largest of five numbers.
13.Write a JavaScript program to check from two given integers, if one is positive and one
is negative.
14.Write a JavaScript program check if a given positive number is a multiple of 3 or a
multiple of 7.
15.Write a JavaScript program to reverse a given string.
16.Write a JavaScript program to check number is Armstrong or not.
17.Write a JavaScript to display squares of 1 to 10 numbers using for loop.
18.Write a JavaScript program to find the area of a triangle where lengths of the three of
its sides are 5, 6, 7.
19.Write a JavaScript program to construct the following pattern, using a nested for loop.
*
**
***
****
*****
MCQ Question
(Total number of Question=Marks*3=12*3=36)
Note: Correct answer is marked with bold.
1.HTML tag under which one can write the JavaScript code?
a) <javascript> c) <script>
b) <scripted> d) <js>
2.JavaScript is ________ language.
a) a compiled c) both a and b
b) an interpreted d) none
3.Which of the following is not a valid JavaScript variable name?
a) 2names c) FirstAndLast
b) _first_and_last_names d) None of the above
4.What is the correct JavaScript syntax to write “Hello World”?
a) System.out.println(“Hello World”) c) document.write(“Hello World”)
b) println (“Hello World”) d) response.write(“Hello World”)
5. A dot is used to
a) Identify a JavaScript comment
b) Separate lines of a JavaScript
c) End a JavaScript statement
d) Separate an object name from either a property or a method
6. Which of the following is the correct syntax to display "Letsfindcourse" in an alert box
using JavaScript?
a) alert-box("Letsfindcourse"); c) msgbox("Letsfindcourse");
b) confirm("Letsfindcourse"); d) alert("Letsfindcourse");
7.Which of the following is the structure of an if statement?
a) if (conditional expression is true) thenexecute this codeend if
b) if (conditional expression is true)execute this codeend if
c) if (conditional expression is true) {then execute this code>->}
d) if (conditional expression is true) then {execute this code}
8.Built-in method returns the length of the string?
a) length() c) index()
b) size() d) None of the above.
9.The following function of String object is used to find a match between a regular
expression and a string, and to replace the matched substring with a new substring?
a) concat() c) replace()
b) match() d) search()
10.Predict the output of the following JavaScript code? var arr=[1,2,3]; var
rev=arr.reverse(); document.writeln(rev);
a) 1,2,3 c) 3
b) 3,2,1 d) 1
11.Which of the following is the correct output for the following JavaScript code:
a) 10 c) 33
b) 6 d) 0
12. What is the role of the "continue" keyword in the following piece of JavaScript code?
Q.1. d) 2-Marks.
Q.2. d) 4-Marks.
Q.3. a) 4-Marks.
Q.3. b) 4-Marks
Q.3. c) 4-Marks
Q.4. d) 4-Marks
----------------------------------------------------------------------------------------------------------------
Descriptive Question
1. Define array.
2. How to declare array in JavaScript.
3. Write a JavaScript for sorting the array elements.
4. Explain the use of join () function with examples.
5. Explain the use of push and pop functions.
6. Write a short note on – associative array in JavaScript.
7. Write syntax for defining the function.
8. Explain the method of calling a function from HTML.
9. What is string? Enlist some commonly used methods for manipulating String.
10.Write a JavaScript to convert string to number.
11.Differentiate between concat() and join() methods of array object.
12.Write a JavaScript function to count the number of vowels in a given
String.
13.Write a JavaScript that find and displays number of duplicate values in an array.
14.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
15.Explain the scope of variable with the help of programming example
16. How to retrieve a position of desired word from the string
MCQ Question
(Total number of Question=Marks*3=14*3=42)
Note: Correct answer is marked with bold
1.Which of the following event fires when the form element loses the focus: <button>,
<input>, <label>, <select>, <textarea>? onfocus onblur onclick ondblclick
a) 1,2,3 c) 3
b) 3,2,1 d) 1
2.What will be the output of the following JavaScript code? var
values=["one","two","Three"]; var ans=values.shift(); document.writeln(ans);
a) one c) three
b) two d) error
3.Built-in method returns the length of the string?
a) length() c) index()
b) size() d) None of the above.
4.The following function of String object is used to find a match between a regular
expression and a string, and to replace the matched substring with a new substring?
a) concat() c) replace()
b) match() d) search()
5.Predict the output of the following JavaScript code? var arr=[1,2,3]; var
rev=arr.reverse(); document.writeln(rev);
a) 1,2,3 c) 3
b) 3,2,1 d) 1
6. Predict the output of the following JavaScript code? var values=["one","two","Three"];
var ans=values.shift(); document.writeln(ans);
a) one c) three
b) two d) error
7.A function with no return value is called ___________
a) Procedures c) Static function
b) Method d) Dynamic function
8.keyword is used to define the function in javascript?
a) void c) function
b) int d) main
9.The _______ method of an Array object adds and/or removes elements from an array.
a) Reverse c) Slice
b) Shift d) Splice
10.output of the following JavaScript code? function info() { int a=1; int b=2; return a*b; }
document.write(info());
a) 1 c) 3
b) 2 d) error
11.The pop() method of the array does which of the following task ?
Q.1. f) 2-Marks.
Q.3. d) 4-Marks.
Q.5. b) 6-Marks.
Q.6. c) 6-Marks.
----------------------------------------------------------------------------------------------------------------
Descriptive Question
1. What is form.
2. Explain two uses of forms.
3. Explain in brief the properties and methods used in form. 4] How will you create
password field in a HTML form ?
4. Explain the use of button element with the help of example
5. What is the difference between group of checkbox buttons and group of radio buttons .
6. Design a simple HTML form for filling the information for registration of a student.
7. Write a form to make login and password.
8. What is event handler. Give an example of event handler in JavaScript. 10] Explain
various commonly used mouse Events in JavaScript.
9. Explain any two keyboard events in JavaScript.
10.Explain how to change attribute values dynamically.
11.Write a JavaScript to create three categories - Fruit, Flower and Colour. 14] Based on
the selection of category, the item, in the option list must get changed.
12.What is intrinsic function?
13.How to disable particular element on the form.
14.What is the use of read-only element in JavaScript.
MCQ Question
(Total number of Question=Marks*3=10*3=30)
Note: Correct answer is marked with bold
1. The following event fires when the form element loses the focus: <button>, <input>,
<label>, <select>, <textarea>?
a) onfocus c) onclick
b) onblur d) ondblclick
2. The following is true?
a) If onKeyDown returns false, the key-press event is cancelled
b) If onKeyPress returns false, the key-down event is cancelled
c) If onKeyDown returns false, the key-up event is cancelled
d) If onKeyPress returns false, the key-up event is cancelled
3. The property that is triggered in response to JavaScript errors?
a) onexception c) onerror
b) onmessage d) onclick
4. Event is fired when a document and all of its external resources are fully loaded and
displayed to the user?
a) Window c) Element
b) Load d) Handler
5. The opposite of the load event in JavaScript is
a) dontload c) preload
b) postload d) unload
6. The event that can be fired on any scrollable document element is
a) Window c) Load
b) Scroll d) Unload
7. Match the following JavaScript function with their description. i) onblur a) script runs
when the element Changes ii) onmouseup b) script runs when the form is reset iii) onchange
c) script runs when the element lost focus. iv) onreset d) script runs when the mouse button is
release
a) i-d, ii-c, iii-a, iv-b c) i-c, ii-d, iii-a, iv-b
b) i-b, ii-c, iii-a, iv-d d) i-a, ii-c, iii-d, iv-b
8. Which event is fired when a document and all of its external resources are fully loaded and
displayed to the user?
a) Window c) Element
b) Load d) Handler
9.Which property is used to add space inside the text field?
a) padding c) number
b) margin d) password
10.The events that are not triggered directly by user activity are called
a) Device-independent input events c) User interface events
b) Device-dependent input events d) State change events
11.Which are the events that have default actions that can be canceled by event handlers?
a) Submit and form-related events c) Submit and reset events
b) Reset and form-related events d) None of the mentioned
12.When are the mouse events generated?
a) When user clicks the mouse over a document c) All of the mentioned
b) When user moves over a document d) None of the mentioned
13. When is the mouseover event fired?
a) When mouse is moved over a new element
b) When mouse is clicked
c) When mouse is both moved and clicked
d) None of the mentioned
14. Which object is passed as the argument to handlers for keydown, keyup, and keypress
events?
a) KeyboardEvent c) Mouse Event
b) Key Event d) Alphabet Event
15. Which of the following is not used with password attribute?
a) name c) maxlength
b) size d) min
16.Which element is used to create multi-line text input?
a) text c) submit
b) textarea d) radio button
17.Which attribute is not used for the radio type?
a) name c) checked
b) value d) selected
18. Which attribute is used with <select> element?
a) multiple c) name
b) selected d) value
19. What among the following is an appropriate event handler for input text among the below
options ?
a) onclick c) onkeyup
b) onchange d) onblur
20. The ……… attribute is only valid on a handful or HTML elements, including forms, form
elements, <iframe> and <img> elements.
a) id c) tag
b) name d) class
21.Which of the following is true?
a) If onKeyDown returns false, the key-press event is cancelled
b) If onKeyPress returns false, the key-down event is cancelled
c) If onKeyDown returns false, the key-up event is cancelled
d) If onKeyPress returns false, the key-up event is canceled
22. Syntax for creating a RegExp object:
1. var txt=new RegExp(pattern,attributes);
2. var txt=/pattern/attributes;
Which of the above mentioned syntax will
correct?
a) 1 only c) Both 1 and 2
b) 2 only d) None of the above
23. If para1 is the DOM object for a paragraph, what is the correct syntax to change the text
within the paragraph?
a) para1="New Text"
b) para1.value="New Text";
c) para1.firstChilnodeValue= "New Text";
d) para1.nodeValue="New Text";
24. The syntax of Eval is ________________
a) [objectName.]eval(numeric) c) [EvalName.]eval(string)
b) [objectName.]eval(string) d) [EvalName.]eval(numeric)
25. The _______ method of an Array object adds and/or removes elements from an array.
a) Reverse c) Slice
b) Shift d) Splice
26. Which tag(s) can handle mouse events in Netscape?
a) <IMG> c) <BR>
b) <A> d) <span>
27. Consider the following code snippet
const pi=3.14;
var pi=4;
console.log(pi);
What will be the output for the above code
snippet?
a) This will flash an error c) Prints 3.14
b) Prints 4 d) Ambiguity
28. What is the default value of the asyc attribute?
a) 0 c) False
b) 1 d) True
29. What is the purpose of the Attr object in the HTML DOM?
Used to focus on a particular part of the HTML
a) c) Used to arrange elements
page
b) HTML Attribute d) None of the mentioned
30. Which among the following POSIX signals generate events?
a) SIGDOWN c) SIGINT
b) SIGFLOAT d) SIGSHORT
----------------------------------------------------------------------------------------------------------------
Position in Question Paper Total Marks- 8
Q.1. c) 2-Marks.
Q.1. g) 4-Marks.
Q.2. c) 4-Marks.
Q.4. c) 4-Marks.
Q.5. c) 6-Marks.
----------------------------------------------------------------------------------------------------------------
Descriptive Question
1. What is cookies?
2. Explain how to create cookies in JavaScript.
3. Explain how to read cookies in JavaScript.
4. Write a JavaScript to delete the cookie.
5. Explain the functions getMonth( setMonth0, toGMTString())
6. Explain the syntax for opening a window.
7. Explain the use offocus() method for window object.
8. Write a JavaScript to change the contents of the newly created window.
9. Write a JavaScript to open multiple windows at a time.
10.What is the use of setTimeout () function? Write a JavaScript toillustrate it.
11.What is the use of setInterval0 function? Write a JavaScript to Illustrateit.
12.Write a JavaScript to display thepathname of the web page usingwindow.location
object.
MCQ Question
(Total number of Question=Marks*3=8*3=24)
Note: Correct answer is marked with bold
2.Cookies are a plain text data record having the following variable length
fields. i) Expires ii) Starts iii) Domain iv) Secure
Q.4. a) 4-Marks.
Q.4. b) 4-Marks.
Q.5. c) 6-Marks.
----------------------------------------------------------------------------------------------------------------
Descriptive Question
1. Define the term -Regular expression.
2. Construct regular expression for validating the phone number in following format only :
(nnn)-nnnn-nnnn OR nnn.nnnn.nnnn
3. Write a Java program that checks whether the string entered by the user Contains digits or
not.
4. Explain any four commonly used methods in regular expression.
5. Write a JavaScript program to create rollover effect for three images.
6. How will you specify the range of characters using a regular expression?
7. Give the regular expression for matching digits and non-digits.
8. Explain any four regular expression object properties
9. What is frame?
10. Explain frameset tag along with the attributes used in it.
11. Write a JavaScript to display frames without border.
12. Write a JavaScript to change the contents of one frame from another frame.
13. WriteJavaScript to change the label of button element present in frame2 fromframe.
14. What is rollover?
15.What are the methods used most commonly during the rollover?
16. Write a JavaScript in which when user rolls over the name of fruit, thecorresponding
image should be displayed. For instance -if user rolls over thetext "Mango"; the image of
Mango should be displayed.
17. Write a JavaScript in which when user rolls over the name of fruit, thecorresponding
image should be displayed. Along with the appropriate imagedisplay, additional window
should pop up displaying the benefit of each fruit.
18. Design the frameset tag for following frame layout
FRAME1
FRAME2
FRAME3
MCQ Question
(Total number of Question=Marks*3=14*3=42)
Note: Correct answer is marked with bold
1. Which among the following regular expression specifies that password should contain
at least one capital letter or one digit.
a) /.*[A-Z].*/.test(password) && /.*[0-9].*/.test(password)
b) /.*[A-Z].*/.test(password) || /.*[0-9].*/.test(password)
c) /.*[A-Z][0-9].*/.test(password)
d) None of the above
2. Which of the following string will match the RegEx "((d).(dd))$"?
a) 223.123 c) 223.12
b) 22.123 d) 2.2
3. Consider the following JavaScript statement containing regular expressions and check
if the pattern matches?
var text = "lestfindcourse: 1, 2, 3";
var pattern = /d+/g;
a) text==pattern c) text.test(pattern)
b) text.equals(pattern) d) pattern.test(text)
4. The regular expression to match any one character not between the brackets is
a) [....] c) [^...]
b) [^] d) [\D]
5. What would be the result of the following statement in JavaScript using regular
expression methods?
Returns
a) Returns ["123""456""789"] c)
[1,2,3,4,5,6,7,8,9]
b) Returns ["123","456","789"] d) Throws an exception
6. What will be the output of the following JavaScript code?
System.out.println( Pattern.matches("[lfc]", "lets") );
a) true c) undefined
b) false d) l
7. What will be the output of the following JavaScript code?
System.out.println( Pattern.matches("[lfc]?", "l") );
a) true c) undefined
b) false d) l
8. What will be the output of the following JavaScript code?
System.out.println( Pattern.matches("\d", "9") );
a) true c) undefined
b) false d) 9
9. What will be the output of the following JavaScript code?
System.out.println( Pattern.matches("[^lfc]", "letsfind") );
a) true c) undefined
b) false d) l
10. What will be the output of the following JavaScript code?
System.out.println( Pattern.matches("[lfc]+", "f") );
a) true c) undefined
b) false d) 1
23. Which of the following keys are not set to true when the keyboard modifier keys are
held down?
a) altKey c) metaKey
b) ctrlKey d) delkey
24. How to detect and respond to mouse drags?
a) Registering a mouseover handler
b) Releasing a mousedown handler
c) Registering a mousedown handler
d) Releasing a mouseover handler
25. When is the mouseover event fired?
When mouse is both
a) When mouse is moved over a new element c)
moved and clicked
b) When mouse is clicked d) When mouse is released
26. When is the mouseout event fired?
a) When mouse is no longer over an element c) When mouse is hovered
b) When mouse is over an element d) When mouse is clicked
27. The focus and blur events are also part of _________
a) Element events c) Window events
b) Handler events d) Scroll events
28. The element that can also register handlers for load and error events is _________
a) html c) body
b) img d) form
29. The events that are emulated by the jQuery library are _________
a) focusarea and focusover c) focusdown and focusup
b) focusall and focusnone d) focusin and focusout
30. Which event is triggered sooner when the document and its elements are ready to
manipulate?
a) DOMContentLoaded
b) readystatechange
c) Both DOMContentLoaded & readystatechange
d) Statechange
31. The ‘$’ present in the RegExp object is called a ____________
a) character c) metacharacter
b) matcher d) metadata
32. Consider the following JavaScript statement containing regular expressions and
check if the pattern matches?
var text = "testing: 1, 2, 3";
var pattern = /\d+/g;
a) text==pattern c) text.test(pattern)
b) text.equals(pattern) d) pattern.test(text)
33. The regular expression to match any one character not between the brackets is
a) […] c) [^…]
b) [^] d) [\D]
34. What does /[^(]* regular expression indicate?
a) Match one or more characters that are not open parenthesis
b) Match zero or more characters that are open parenthesis
c) Match zero or more characters that are not open parenthesis
d) Match one or more characters that are open parenthesis
35. What will be the result when non greedy repetition is used on the pattern /a+?b/?
a) Matches the letter b preceded by the fewest number of a’s possible
b) Matches the letter b preceded by any number of a
c) Matches letter a preceded by letter b, in the stack order
d) Matches letter a present in the string
36. What does the subexpression /java(script)?/ result in?
a) it matches “java” followed by the optional “script”
b) It matches “java” followed by any number of “script”
c) It matches “java” followed by a minimum of one “script”
d) It matches “java” followed by a single “script”
37. What is the most essential purpose of parentheses in regular expressions?
a) Define pattern matching techniques
b) Define subpatterns within the complete pattern
c) Define portion of strings in the regular expression
d) matching the complete string
38. The method that performs the search-and-replace operation to strings for pattern
matching is _______
a) searchandreplace() c) edit()
b) add() d) replace()
39. What would be the result of the following statement in JavaScript using regular
expression methods?
a) Returns [“123″”456″”789”] c) Returns [1,2,3,4,5,6,7,8,9]
b) Returns [“123″,”456″,”789”] d) Throwsan exception
40. What will be the output of the following JavaScript code?
System.out.println(Pattern.matches("[amn]?", "a"));
a) TRUE c) undefined
b) FALSE d) bcd
41. What will be the output of the following JavaScript code?
a) TRUE c) undefined
b) FALSE d) 1
42. What will be the output of the following JavaScript code?
System.out.println(Pattern.matches("[adf]+", "a"));
a) TRUE c) undefined
b) FALSE d) 0
43. What will be the output of the following JavaScript code?
System.out.println(Pattern.matches("[^abc]", "aemngq"));
a) TRUE c) undefined
b) FALSE d) 1
----------------------------------------------------------------------------------------------------------------
Position in Question Paper Total Marks-12
Q.4. e) 4-Marks.
Q.6. a) 6-Marks.
Q.6. b) 6-Marks.
----------------------------------------------------------------------------------------------------------------
Descriptive Question
1.What is the use of status bar in a web application?
2. State the method to put message in web browser status bar?
3. Write a JavaScript program that create a scrolling text on the status line of awindow.
4. Write a program to display a javascript status bar message whenever yourusers hover over
your hyperlinks.
5. Write a JavaScript to scroll the status bar message horizontally
6. What is banner ad?
7. Develop a JavaScript Program to Create Rotating Banner Ads with URL Links.
8. Write a JavaScript to create and display banner
9. Write a JavaScript that illustrates linking of banner advertisement to URL
10. Whatis slide show?
11. Writea JavaScript to show the creation of slide show,
12. Explainwith suitable example how to create a pull down menu.
13. Whatis dynamic menu?
14. Howto create dynamically changing menu in JavaScript.
15. Whatis float menu?
16. Explainchain select menu with necessary illustration.
17. Whatis tab menu? Explain it with diagrammatic representation.
18. Explainfolding tree menu.
19. Whatis the use ofscrollable menu?
20. Createa slideshow with the group of four images, also simulate the next andprevious
transition between slides in your JavaScript.
21. Listways of protectingyour webpage and describe any one of them.
22. Writea JavaScript that disables the right click button and displays themessage 'Right click
button is ‘disable'.
23. Writeshort note on -Frameworks of JavaScript and its applications.
MCQ Question
(Total number of Question=Marks*3=12*3=36)
Note: Correct answer is marked with bold
32. Which of the following CSS Property defines which property values to apply to
the element before the animation begins (if delayed) and after it ends?
a) animation-play c) animation-fill-mode
b) animation-delay d) animation-play-state
33. Which of the following CSS Property sets the pace of the transition to the next
keyframe, as described in the previous section?
a) animation-timing-function c) animation-transition-function
b) animation-pace-function d) none of the mentioned
34. Which of the following CSS property defines whether the animation is running
or paused?
a) animation-pause-state c) animation-play-state
b) animation-state d) all of the mentioned
35. Which of the following property specifies whether an element is an accelerator
indicator or not?
a) animation c) scan
b) accelerator d) none of the mentioned
36. Which of the following property specifies the direction in which a marquee
should move?
a) marquee c) marquee-time
b) marquee-direction d) none of the mentioned