Practical_Exam_Questions CSS
Practical_Exam_Questions CSS
1. 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 and four buttons for addition,
subtraction, multiplication and division.
2. Write a JavaScript program to check whether entered number is prime or not.
3. Write a JavaScript function to generate Fibonacci series till user defined limit.
4. Write a JavaScript program to calculate the factorial of a number using a looping statement.
5. Develop a JavaScript program to sort an array of numbers in ascending order.
6. Create a JavaScript program to find the sum of all elements in an array.
7. Create a program to find the largest and smallest numbers in an array.
8. Write a JavaScript function that checks whether string is palindrome or not, accept string from user
and pass it as an argument to the function.
9. Write a JavaScript that takes a String as input and performs the following operations on String:
• Convert the sentence to lowercase.
• Remove any extra spaces at the beginning or end of the sentence.
• Split the sentence into an array of words.
10. Create a Student Registration Form using HTML and JavaScript. Validate fields such as:
• Name: Only alphabets allowed.
• Email: Must include @ and .com.
• Age: Must be between 18 and 30.
12. Design a Form and Accept name, email and pin code(number only) from user in a form, where
• Name, Email, Pin code should not be blank
• Pen code must be 6 digits long
13. Develop a Program to replace submit and reset button with image Using Intrinsic Function.
14. Create a webpage with a button to set a cookie that expires after 7 days. Display a message
indicating when the cookie will expire. Accept name and value of cookie from user.
15. Develop a webpage where clicking a button opens a child window displaying "Welcome to the
Window Practical”, with a custom size (e.g., 400x400 pixels) and title "Child Window".
16. Create a webpage with two buttons: one to open a child window with message “Child window is
opened” , and another to close the child window show alert when closed.
17. Write a JavaScript program to validate email ID, Phone Number of the user using regular
expression.
18. Write a JavaScript to create Rollover effect, where font colour or background colour of text changes
when user rolls over(hover) the text(display multiple fruit names).
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 to create and display banner on webpage loading, banner will be removed
automatically after 5 seconds of webpage loading.