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