UNIT NO 1:- Basic Of JS Programming 12m
1. List various assignment operators supported by JavaScript, explain any two with the help of suitable
example
2. With the help of suitable example explain the Date object and any two methods of Date object
3. Describe the “navigator” object of JavaScript. Describe the methods of navigator object which is
used to display browser name and version.
4. Give syntax of and explain for-in loop in JavaScript with the help of suitable example
5. List the logical operators in JavaScript with description.
6. State any four properties of Navigator object.
7. Explain getter and setter properties in JavaScript with suitable example.
8. Explain Object creation in JavaScript using ‘new’ keyword with adding properties and methods with
example.
9. State the features of Javascript.
10. Differentiate between For-loop and For-in loop.
11. List the comparison operators in Java script.
12. State any two properties and methods of location object.
13. Explain Object name, property, method, Dot Syntax, Main Event
14. Explain open () method of window object with syntax and example.
UNIT NO 2:- Array Function and String 14 m
1. Differentiate between shift() and push() methods of an Array object.
2. State the meaning of “Defining a function”. Explain with the help of an example.
3. Differentiate between substring() and substr() method of a string class. Give suitable example of
each
4. Write a JavaScript that initializes an array called Colors with the names of 3 Colors and display the
array element s.
5. Explain calling a function with arguments in JavaScript with example.
6. Differentiate between push() and join() method of array object with respect to use, syntax, return
value and example.
7. Write the use of charCodeAt() and from CharCode() indexof() method with syntax and example.
8. Explain splice() method of array object with syntax and example
9. Differentiate between concat() and join() methods of array object.
10. Write a javascript function that accepts a string as a parameter and find the length of the string.
11. Explain prompt () and confirm () method of Java script with syntax and example.
12. Write a javascript function to generate Fibonacci series till user defined limit.
13. Write a javascript program to demonstrate java intrinsic function.
UNIT NO 3 Form And Event Handling 10 m
1. List and explain any six form events
2. Enlist any four mouse events with their use.
3. Explain following form events : (i) onmouseup (ii) onblur
4.
UNIT NO 4 Cookies And Browser Data 08m
1. State what is a cookie ? Explain its need. State characteristics of persistent cookies
2. Explain how to create and read Persistent Cookies in JavaScript with example.
3. Differentiate between bession cookies and persistent cookies.
4. Describe, how to read cookie value and write a cookie value. Explain with example.
UNIT NO 5 Regular Expression Rollover And Frames 14m
1. Explain test() and exec() method of Regular Expression object with example.
2. State what is regular expression. Explain its meaning with the help of a suitable example.
3. Describe regular expression. Explain search () method used in regular expression with suitable
example.
4. Explain text rollover with suitable example.
5. Explain frame works of javascript and its application.
5. Form regular expressions for following :
(i) Validation of email address.
(ii) Validation of adhaar card. Format is dddd – dddd – dddd
(iii) Validation of phone number. Format is (ddd) – (dddddddd
6. List any three properties of regular expression objects and state their use
UNIT No 6 Menus Navigation and Web Page Protection 12m
1. Explain text and image rollover with suitable example.
2. List ways of protecting your web page and describe any one of them.
3. What is Status bar and how to display moving message on the status line of a window using JavaScript
?
PROGRAMS….
1. Write a JavaScript that accepts a number and displays addition of digits of that number in a message
box
2. 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)
3. Write an HTML Script that displays the following webpage output :
First Number : Second Number : Add Sub Mul 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.
4. Write a JavaScript that accepts user’s first name and domain name of organization from user. The
JavaScript then forms email address as and displays the results in the browser window
5. 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”.
6. 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.
7. Write an HTML script that displays names of different brands of Laptop and an image by default as
When the mouse moves over the specific brand name the script must display the image of respective
Laptop in the adjacent box
8. Write a JavaScript that demonstrates use of floating menu alongwith respective HTML script
9. Write HTML and respective JavaScript such that
(i) Webpage displays three checkboxes as :
(ii) When a beverage is selected a dropdown list with options as below appears on page : (a) If
“TEA” option is checked dropdown list contains
10. List and explain any six form events. (b) 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
11.
12. Write JavaScript to create a object “student” with properties roll number, name, branch, year. Delete
branch property and display remaining properties of student object
13. 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”
…………
………....
14. 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
15. 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.
16. 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)
17. 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.
18. Write a script for creating following frame structure :
Frame 1 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.
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.
19. 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.
20. Write a javascript program to check whether entered number is prime or not.
21. Write a javascript program to changing the contents of a window
22. Write a javascript syntax to accessing elements of another child window.
23. Write a javascript program to validate user accounts for multiple set of user ID and password (using
swith case statement).
24. 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.
25. Write a javascript program to create read, update and delete cookies.
26. Write a javascript program to link banner advertisements to different URLs.
27. 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.
28. Write a javascript program to validate email ID of the user using regular expression.
29. Write a javascript program to design HTML page with books information in tabular format, use
rollovers to display the discount information.
30. Write a javascript to checks whether a passed string is palindrome or not.
31. Develop javascript to convert the given character to unicode and vice-versa.
32. 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.
33. Write a javascript to open a new window and the new window is having two frames. One frame
containing buthon as “click here !”, and after clicking this button an image should open in the second
frame of that child window.
34. Write a javascript to create option list containing list of images and then display images in new
window as per selection.
35. Write Java script to create person object with properties firstname, lastname, age, eye color, delete
eye color property and display remaining properties of person object.
36. Write a Java script that initializes an array called flowers with the names of 3 flowers. The script then
displays array elements.
37. Write Java script to call function from HTML.
38. Write a Java script to design a form to accept values for user ID & password.
39. Write a Java script that will replace following specified value with another value in a string.
String = “ I will fail”
Replace “fail” by “pass”
40. Write a Java script code to display 5 elements of array in sorted order.
41. Write a Java script program which computes, the average marks of the following students then, this
average is used to determine the corresponding grade.
42. 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.
43. 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
44. 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
47. Write a script for creating following frame structure
FRUITS, FLOWERS and CITIES are links to the webpage fruits.html, flowers.html, cities.html respectively.
When these links are clicked corresponding data appears in FRAME 3.
48. 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.
ADDITIONAL
1. Create a slideshow with the group of three images, also simulate next and previous transition
between slides in your Java script.
2. Describe how to evaluate checkbox selection. Explain with suitable example.
3. State the ways to display the output in JavaScript.
4. Explain how to create and display Rotating Banner in JavaScript with example.
5. Explain how to evaluate Radiobutton in JavaScript with suitable example
6. State meaning of each token of the following statement and describe it :
(i) ++a;
(ii) document. bgcolor;
7. Write and explain syntax of prompt() method in JavaScript
8. Give syntax of and explain the use of small “with” clause
9. Give syntax of and explain the use of SetTime Out( ) function with the help of suitable example.
10. State the use of hiding the JavaScript. Explain the steps needed to accomplish it and describe the
process