JavaScript Lab Project 12

 Write a JavaScript code:

Program 1

  1. To pass the value as argument l,b,h and calculate volume of a box in function.
  2. To pass the value as argument l,b and calculate area of base of that box in function.
  3. Make a area button to display area of base result and a volume button to display volume of a box.
  4. Make a all button if we click on that it should give output in proper format. (Area is = , Volume is =                                   Output should come in Alert box, Bellow the button, Console area.
Program 2

  1. In HTML window area should be 4 buttons. (Add, Subtract, Multiply, All)
  2. User should enter the value.
  3. Below the button Answer should come as: Result(Add) = Answer.
  4. There should be three different functions.
  5. There should be only one user input code(Only two lines in whole program) for data entry
  6. While clicking 'All' button there should be answer of each calculation result.
Program 3
  1. There should be a first function for calculation and result should be return. sum(a,b)
  2. In second function, value should be passed and should call the first function. sum(25,30)
  3. When user clicks a button second function should be called and output should come in down side.
Program 4
  1. To calculate square root of sum of any two numbers.
  2. There should be a function to pass two value as an argument. hypotenuse(a,b)
  3. Inside first function there should be second function to make square of individual numbers. square(x)
  4. Internal function should return square value to outer function.
  5. Outer function should find square root of two function's returned value.
  6. Outer function should return the value.
Program 5
  1. Make two text boxes to enter Nepali amount and display result.
  2. Make any three buttons of different country. USA, Canada, Australia
  3. When user clicks in those buttons display calculated value in text box of today's currency value.
  4. Display today's date too.
Program 6
  1. Make a text box.
  2. Make a button to generate random numbers.
  3. In first text box display clicked number and in another random numbers.
Database Connectivity Project
  1. Create a database School.
  2. Create a table student with sno, name, class, roll no, address, phone number
  3. Add a record.
  4. Create a form to insert data in student table.
  5. Create a form to search data from student table on the basis of class and roll number
  6. Create a form to delete data from table.

Comments

Popular posts from this blog

Question Collection-11

Important Questions for XII