postheadericon JavaScript Exercises

1.  Write a JavaScript that shows how a variable’s type can be changed on-the-fly.
2.  Write a JavaScript that demonstrates the use of +=,-=,*=,/= operators.
3.  Create a Form in HTML with two fields, minimum and maximum, write JavaScript to validate that only numeric value is entered in both, and the value entered in minimum is less than the value entered in maximum.
4.  Write a JavaScript that finds out multiples of 10 in 0 to 10000. On the click of button start the timer and stop the counter after 10 seconds. Display on the screen how many multiples of 10 are found out within stipulated time.
5.  Write a JavaScript to generate two random numbers and find out maximum and minimum out of it.

6.  Write a JavaScript to remove the highest element from the array and arrange the array in ascending order.
7.  Write a JavaScript to convert Celsius to Fahrenheit.
8.  Write a JavaScript to find a string from the given text. If the match is found then replace it with another string.
9.  Write a JavaScript to show a pop up window with a message Hello and background color lime and with solid black border.
10. Create a Form which have following fields
a.       First Name, Middle Name, Last Name {  Textbox , Hint Text should be added  }
b.      Full Name { DIV }
c.       Gender  { Radio Button }
d.      Address { Text area }
e.      City { select / Drop down, default text : Select City}
f.        zip code {six number only, numeric only}
g.       Contact Number Type { Select / List box of size 2 Land Line and Mobile ( default)}
h.      Contact Number {Textbox}
i.         Email { put email validation  }
j.        Image  {File}
k.       Languages known { Check boxes, Gujarati, Hindi and English,  Keep default Gujarati}
l.        NOTE:
·   Create Columnar Form
·   Give from grouping text / title “Personal Information”
·   Do not use HTML5
·   Use Html Table for proper formatting of form
·   On focus and lost focus event, text box color should be different.
·   In Name special symbols are not allowed
·   Name only accept character keys
·   Full name must be updated while inputting information in name
·   In Full name, only initial character of middle name and a . {dot} should be display
1.       Example of Name  : Bipin Sureshbhai Rupadiya
2.       Value in Full Name: Bipin S. Rupadiya
·   Zip code only accept numeric keys
·   Add field level validation for zip code
1.       Error message should be display beside DIV
2.       DIV use icon for information and error
3.       Information text color should be Blue and error text color Red
4.       Apply validation on change event of text box
·   After lost focus Contact it should format Number in following way
1.       0919228582425 to  +091-92828-2525
2.       9102882567124 to  +091-0288-2657125
·   Add form level validation to all field
1.       All field must be fill with appropriate value
2.       If form is valid make all form field disable
3.       On reset of form, initial state of form should be maintain as mention above
·   Keep all form level validation in external FormValidation.js
11. Create HTML form for Counter / Timer
a.       Form have A text box to show number
b.      Text box must be read only
c.       Form must have Three Button
·   START : to Start the counter / Timer
·   STOP   : to stop counter value
·   RESET : to restart counter from ZERO
d.      Form must have two DIV that show starting and ending times

e.      When you STOP the timer it show the time difference in minutes and seconds 


Total Pageviews

© Powered by Blogger.