1. Write a script to greet your website visitor using JS alert box. (Welcome to Our Website)
2. Write a script to display message on your web page. (Error! Please Enter avalid password)
3. Write a script to display message on your web page: (Hint : Use line break)
4. Write a script to display messages in sequence (3 Alerts)
5. Make use of alerts in your new/existing HTML & CSS project.
6. Practice placement of element in following sections of your project in exercise 5:
Ans:6
" Head tag "
" Body tag reamain same as before, inside, after "
7. Declare a variable called username & 8. Declare a variable called myName & assign to it a string that represents your Full Name.
9. Write script to
10. Write a script to save student's bio data in JS variables and show the data in alert boxes.
11. Declare a variable called email and assign to it a string that represents your Email Address(e.g. example@example.com). Show the blow mentioned message in an alert box.(Hint: use string concatenation)
12. Write a script to display this in browser through JS. & 13. Store following string in a variable and show in alert and browser through JS “▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬▬”
14. Declare a variable called age & assign to it your age. Show your age in an alert box.
15. Declare & initialize a variable to keep track of how many times a visitor has visited a web page. Show his/her number of visits on your web page. For example: “You have visited this site N times”.
16. Declare a variable called birthYear & assign to it your birth year. Show the following message in your browser:
17. A visitor visits an online clothing store www.xyzClothing.com . Write a script to store in variables the following information: a. Visitor's name b. Product title c. Quantity i.e. how many products a visitor wants to order Show the following message in your browser: “John Doe ordered 5 T-shirt(s) on XYZ Clothing store”.
18. Declare 3 variables in one statement.
19. Declare 5 legal & 5 illegal variable names.
20.Display this in your browser
21. Write a program that take two numbers & add them in a new variable. Show the result in your browser. & 22.Repeat task21 for subtraction, multiplication, division & modulus.
23. Do the following using JS Mathematic Expressions
24. Cost of one movie ticket is 600 PKR. Write a script to store ticket price in a variable & calculate the cost of buying 5 tickets to a movie.
25. Write a script to display multiplication table of any number in your browser.