Sunteți pe pagina 1din 3

Practical No.

1. Add JavaScript validations in registration form. Name text field should not
accept any digit; telephone number text field should not accept characters.
Display the appropriate message in the status bar when any field gains focus.
Empty fields should not be allowed.

2. Create an html page that accepts Principal Amount, No. of Years & Rate of
Interest from 3 text fields, when you click “Calculate Interest” button, the data
is sent to a function that returns the simple interest. When you click on “Final
Amount” button, the final amount by adding principal amount and interest
should be displayed.
Practical No. 7

1. Design a web page with a table with three cells, namely, red, green and
yellow. As soon as mouse is rolled over any of these cells, the background
color of the body should change to that particular color.

2. Write a JavaScript code to study the String object and various methods.

3. Write a JavaScript code display the browser specifications.


Practical No. 8

1. Write a JavaScript code to read in a number and display its multiplication


table.

2. Write a JavaScript code to read in a number and state whether it is prime or


not.

3. Write a JavaScript code to read in an expression through a prompt box,


evaluate it and display the result in a message box.

4. Write a JavaScript code to read in a number through a prompt box, and


display its factorial in a message box.

5. Write a JavaScript code to study the properties of the History object.

S-ar putea să vă placă și