Here you can find a number of examples on Java Script.Please find the various kinds of examples listed on the right side of this site. If you don't find anything on Java Script then please write to us or leave a commnet. We are pleased to help and find the solution of your problem.
Showing posts with label javascriptexample. Show all posts
Showing posts with label javascriptexample. Show all posts

JavaScript: Validation

<html>
<head>
<title>Enquiry Form</title>
<script language="javascript">
function check()
{
var email=f1.email.value;
if(f1.fname.value=="")
alert("Please enter first name");
else
if(f1.lname.value=="")
alert("Please enter last name");
else
if(f1.cno.value=="")
alert("Please enter contact number");
else
if(isNaN(f1.cno.value))
alert("Please enter correct contact number");
else
if(f1.add.value=="")
alert("Please enter address");
else
if(f1.email.value=="")
alert("Please enter Email address");
else
if(email.indexOf("@")==-1)
alert("Missing '@' in Email address");
else
if(email.indexOf(".")==-1)
alert("Missing '.' in Email address");
else
if(f1.course.value=="select")
alert("Please select the course name");
else
if(f1.d.value=="Day")
alert("Please enter day");
else
if(f1.M.value=="month")
alert("Please enter Month");
else
if(f1.y.value=="year")
alert("Please enter Year");
}

</script>
</head>
<body>
<h1>Enquiry Form</h1><p>
<form name="f1" action="mailto:yourmailid@sitename.com" method="post">
<table width="60%">
<tr>
<td width="50%">First Name: </td><td width="50%"><input type="text" name=fname></td></tr>
<tr>
<td>Last Name: </td><td><input type="text" name=lname></td></tr>
<tr><td>Gender: </td><td><input type="radio" name=g checked>Male <input type="radio" name=g>Female</td></tr>
<tr><td>PhoneNumber:</td><td><input type="text" name=cno></td></tr>
<tr><td>Address: </td><td><textarea name="add"></textarea></td></tr>
<tr><td>Email-id</td><td><input type="text" name=email style="background-color:yellow"></td></tr>
<tr><td>Date of Birth: </td><td>
<select name="d">
<OPTION value="Day" selected>Day</OPTION>
<OPTION value=1>1</OPTION> <OPTION value=2>2</OPTION>
<OPTION value=3>3</OPTION> <OPTION value=4>4</OPTION>
<OPTION value=5>5</OPTION> <OPTION value=6>6</OPTION>
<OPTION value=7>7</OPTION> <OPTION value=8>8</OPTION>
<OPTION value=9>9</OPTION> <OPTION
value=10>10</OPTION> <OPTION value=11>11</OPTION>
<OPTION value=12>12</OPTION> <OPTION
value=13>13</OPTION> <OPTION value=14>14</OPTION>
<OPTION value=15>15</OPTION> <OPTION
value=16>16</OPTION> <OPTION value=17>17</OPTION>
<OPTION value=18>18</OPTION> <OPTION
value=19>19</OPTION> <OPTION value=20>20</OPTION>
<OPTION value=21>21</OPTION> <OPTION
value=22>22</OPTION> <OPTION value=2>23</OPTION>
<OPTION value=24>24</OPTION> <OPTION
value=25>25</OPTION> <OPTION value=26>26</OPTION>
<OPTION value=27>27</OPTION> <OPTION
value=28>28</OPTION> <OPTION value=29>29</OPTION>
<OPTION value=30>30</OPTION> <OPTION
value=31>31</OPTION></SELECT>
<select name="M">
<OPTION value="month" selected>Month</OPTION> <OPTION
value=Jan>Jan</OPTION> <OPTION value=Feb>Feb</OPTION>
<OPTION value=March>March</OPTION> <OPTION
value=April>April</OPTION> <OPTION
value=May>May</OPTION> <OPTION
value=June>June</OPTION> <OPTION
value=July>July</OPTION> <OPTION
value=Aug>Aug</OPTION> <OPTION
value=Sept>Sept</OPTION> <OPTION
value=Oct>Oct</OPTION> <OPTION value=Nov>Nov</OPTION>
<OPTION value=Dec>Dec</OPTION></SELECT>
<select name="y">
<OPTION value="year" selected>Year</OPTION>
<OPTION value=2008>2008</OPTION> <OPTION
value=2007>2007</OPTION> <OPTION
value=2006>2006</OPTION> <OPTION
value=2005>2005</OPTION> <OPTION
value=2004>2004</OPTION> <OPTION
value=2003>2003</OPTION> <OPTION
value=2002>2002</OPTION> <OPTION
value=2001>2001</OPTION> <OPTION
value=2000>2000</OPTION> <OPTION
value=1999>1999</OPTION> <OPTION
value=1998>1998</OPTION> <OPTION
value=1997>1997</OPTION> <OPTION
value=1996>1996</OPTION> <OPTION
value=1995>1995</OPTION> <OPTION
value=1994>1994</OPTION> <OPTION
value=1993>1993</OPTION> <OPTION
value=1992>1992</OPTION> <OPTION
value=1991>1991</OPTION> <OPTION
value=1990>1990</OPTION> <OPTION
value=1989>1989</OPTION> <OPTION
value=1988>1988</OPTION> <OPTION
value=1987>1987</OPTION> <OPTION
value=1986>1986</OPTION> <OPTION
value=1985>1985</OPTION> <OPTION
value=1984>1984</OPTION> <OPTION
value=1983>1983</OPTION> <OPTION
value=1982>1982</OPTION> <OPTION
value=1981>1981</OPTION> <OPTION
value=1980>1980</OPTION> <OPTION
value=1979>1979</OPTION> <OPTION
value=1978>1978</OPTION> <OPTION
value=1977>1977</OPTION> <OPTION
value=1976>1976</OPTION> <OPTION
value=1975>1975</OPTION> <OPTION
value=1974>1974</OPTION> <OPTION
value=1973>1973</OPTION> <OPTION
value=1972>1972</OPTION> <OPTION
value=1971>1971</OPTION> <OPTION
value=1970>1970</OPTION> <OPTION
value=1969>1969</OPTION> <OPTION
value=1968>1968</OPTION> <OPTION
value=1967>1967</OPTION> <OPTION
value=1966>1966</OPTION> <OPTION
value=1965>1965</OPTION> <OPTION
value=1964>1964</OPTION> <OPTION
value=1963>1963</OPTION> <OPTION
value=1962>1962</OPTION> <OPTION
value=1961>1961</OPTION> <OPTION
value=1960>1960</OPTION> <OPTION
value=1959>1959</OPTION> <OPTION
value=1958>1958</OPTION> <OPTION
value=1957>1957</OPTION> <OPTION
value=1956>1956</OPTION> <OPTION
value=1955>1955</OPTION> <OPTION
value=1954>1954</OPTION> <OPTION
value=1953>1953</OPTION> <OPTION
value=1952>1952</OPTION> <OPTION
value=1951>1951</OPTION> <OPTION
value=1950>1950</OPTION> <OPTION
value=1949>1949</OPTION> <OPTION
value=1948>1948</OPTION> <OPTION
value=1947>1947</OPTION> <OPTION
value=1946>1946</OPTION> <OPTION
value=1945>1945</OPTION> <OPTION
value=1944>1944</OPTION> <OPTION
value=1943>1943</OPTION> <OPTION
value=1942>1942</OPTION> <OPTION
value=1941>1941</OPTION> <OPTION
value=1940>1940</OPTION> <OPTION
value=1939>1939</OPTION> <OPTION
value=1938>1938</OPTION> <OPTION
value=1937>1937</OPTION> <OPTION
value=1936>1936</OPTION> <OPTION
value=1935>1935</OPTION> <OPTION
value=1934>1934</OPTION> <OPTION
value=1933>1933</OPTION> <OPTION
value=1932>1932</OPTION> <OPTION
value=1931>1931</OPTION> <OPTION
value=1930>1930</OPTION> <OPTION
value=1929>1929</OPTION> <OPTION
value=1928>1928</OPTION> <OPTION
value=1927>1927</OPTION> <OPTION
value=1926>1926</OPTION> <OPTION
value=1925>1925</OPTION> <OPTION
value=1924>1924</OPTION> <OPTION
value=1923>1923</OPTION> <OPTION
value=1922>1922</OPTION> <OPTION
value=1921>1921</OPTION> <OPTION
value=1920>1920</OPTION> <OPTION
value=1919>1919</OPTION> <OPTION
value=1918>1918</OPTION> <OPTION
value=1917>1917</OPTION> <OPTION
value=1916>1916</OPTION> <OPTION
value=1915>1915</OPTION> <OPTION
value=1914>1914</OPTION> <OPTION
value=1913>1913</OPTION> <OPTION
value=1912>1912</OPTION> <OPTION
value=1911>1911</OPTION> <OPTION
value=1910>1910</OPTION> <OPTION
value=1909>1909</OPTION> <OPTION
value=1908>1908</OPTION> <OPTION
value=1907>1907</OPTION> <OPTION
value=1906>1906</OPTION> <OPTION
value=1905>1905</OPTION> <OPTION
value=1904>1904</OPTION> <OPTION
value=1903>1903</OPTION> <OPTION
value=1902>1902</OPTION> <OPTION
value=1901>1901</OPTION></SELECT>
</td></tr>
<tr><td><center>
<input type="submit" value="Submit" onclick="check()"> </center></td><td>    
<input type="reset" value="reset"></td></tr>
</table>
</form>
</body>
</html>

JavaScript: Disable right click options

<html>
<head>
<title>Disable right click options</title>
<script language="javascript">
function click()
{
<-------Javascript start-----
if(event.button==2)
{
alert("Disabled");
}
}
document.onmousedown=click
-------Javascript End-------->
</script>
</head>
</html>

Introduction to JavaScript



JavaScript is used in millions of Web pages to improve the design, validate forms, detect browsers, create cookies, and much more.

JavaScript is the most popular scripting language on the internet, and works in all major browsers, such as Internet Explorer, Firefox, and Opera.




What is JavaScript?

  1. Jvascript is a Object Oriented Language

  2. Javascript is a Scripting Language

  3. Javascript is case sensitive

  4. Javascript is Interpreted Language

  5. A scripting Language is a lightweight Programming Language

  6. JavaScript was designed to add interactivity to HTML pages

  7. A JavaScript consists of lines of executable computer code

  8. Javascript Language is clientside Scripting




Are Java and JavaScript the Same?
NO!

Java and JavaScript are two completely different languages in both concept and design!

Java (developed by Sun Microsystems) is a powerful and much more complex programming language - in the same category as C and C++.


JavaScript: unshift Function



unshift Function:
Adds one or more elements to the beginning of an array and returns the new length of the array.

Syntax:
arrayname.unshift(element1,element2.........elementn)



Example in HEAD section:

<html>
<head>
<title>unshift Function</title>
<script language="javascript">
var nushifted;
myArray = ["angel", "clown"];
document.writeln("myArray before: " + myArray + "<p>");
unshifted = myArray.unshift("mandarin", "surgeon");
document.writeln("myArray after: " + myArray + "<p>");
</script>
</head>
</html>


Example in BODY section:

<html>
<head>
<title>unshift Function</title>
</head>
<body>
<script language="javascript">
var nushifted;
myArray = ["angel", "clown"];
document.writeln("myArray before: " + myArray + "<p>");
unshifted = myArray.unshift("mandarin", "surgeon");
document.writeln("myArray after: " + myArray + "<p>");
</script>
</body>
</html>




OUTPUT

myArray before: angel,clown

myArray after: angel,clown,mandarin,surgeon

JavaScript: CharAt Function



charAt Function:
Using the charAt method you can find out the element in a string.

Syntax:
variablename.charAt(indexnumber);



Example in HEAD section:

<html>
<head>
<title>charAt Function</title>
<script language="javascript">
var anystring="Hello World";
document.write("The character at index 0 is " +anystring.charAt(0)+"<br>");
document.write("The character at index 1 is " +anystring.charAt(1)+"<br>");
document.write("The character at index 2 is " +anystring.charAt(2)+"<br>");
document.write("The character at index 3 is " +anystring.charAt(3)+"<br>");
document.write("The character at index 4 is " +anystring.charAt(4)+"<br>");
document.write("The character at index 5 is " +anystring.charAt(5)+"<br>");
document.write("The character at index 6 is " +anystring.charAt(6)+"<br>");
document.write("The character at index 7 is " +anystring.charAt(7)+"<br>");
document.write("The character at index 8 is " +anystring.charAt(8)+"<br>");
document.write("The character at index 9 is " +anystring.charAt(9)+"<br>");
document.write("The character at index 10 is " +anystring.charAt(10));
</script>
</head>
</html>


Example in BODY Section:

<html>
<head>
<title>charAt Function</title>
</head>
<body>
<script language="javascript">
var anystring="Hello World";
document.write("The character at index 0 is " +anystring.charAt(0)+"<br>");
document.write("The character at index 1 is " +anystring.charAt(1)+"<br>");
document.write("The character at index 2 is " +anystring.charAt(2)+"<br>");
document.write("The character at index 3 is " +anystring.charAt(3)+"<br>");
document.write("The character at index 4 is " +anystring.charAt(4)+"<br>");
document.write("The character at index 5 is " +anystring.charAt(5)+"<br>");
document.write("The character at index 6 is " +anystring.charAt(6)+"<br>");
document.write("The character at index 7 is " +anystring.charAt(7)+"<br>");
document.write("The character at index 8 is " +anystring.charAt(8)+"<br>");
document.write("The character at index 9 is " +anystring.charAt(9)+"<br>");
document.write("The character at index 10 is " +anystring.charAt(10));
</script>
</body>
</html>



OUTPUT

These lines display the following:

The character at index 0 is H
The character at index 1 is e
The character at index 2 is l
The character at index 3 is l
The character at index 4 is o
The character at index 5 is
The character at index 6 is W
The character at index 7 is o
The character at index 8 is r
The character at index 9 is l
The character at index 10 is d

JavaScript: Blink Function



blink:
Causes a string to blink as if it were in a BLINK tag.

Syntax:
blink()

Description:
Use the blink method with the write or writeln methods to format and display a string in a document. In server-side JavaScript, use the write function to display the string.



Example in HEAD section:

<html>
<head>
<title>Blink Function<.title>
<script language="javascript">
var worldstring="Hello, World";
document.write(worldstring.blink());
document.write("<p>" + worldstring.bold());
document.write("<p>" + worldstring.italics());
document.write("<p>" + worldstring.strike());
</script>
</head>
</html>


Example in HEAD section:

<html>
<head>
<title>Blink Function<.title>
</head>
<body>
<script language="javascript">
var worldstring="Hello, World";
document.write(worldstring.blink());
document.write("<p>" + worldstring.bold());
document.write("<p>" + worldstring.italics());
document.write("<p>" + worldstring.strike());
</script>
</body>
</html>




OUTPUT

Hello, World

Hello, World

Hello, World

Hello, World

JavaScript: Shift Function



shift Function:
Removes the first element from an array and returns that element. This method changes the length of the array.

Syntax:
arrayname.shift()



Example in HEAD section:

<html>
<head>
<title>Shift Function</title>
<script language="javascript">
myArray = ["angel", "clown", "mandarin", "surgeon"];
document.writeln("myArray before: " + myArray + "<p>");
shifted = myArray.shift();
document.writeln("myArray after: " + myArray + "<p>");
document.writeln("Removed this element: " + shifted);
</script>
</head>
</html>


Example in BODY section:

<html>
<head>
<title>Shift Function</title>
</head>
<body>
<script language="javascript">
myArray = ["angel", "clown", "mandarin", "surgeon"];
document.writeln("myArray before: " + myArray + "<p>");
shifted = myArray.shift();
document.writeln("myArray after: " + myArray + "<p>");
document.writeln("Removed this element: " + shifted);
</script>
</body>
</html>




OUTPUT

myArray before: angel,clown,mandarin,surgeon

myArray after: clown,mandarin,surgeon

Removed this element: angel

JavaScript: Random Function



random function:
Returns a pseudo-random number between 0 and 1. The random number generator is seeded from the current time, as in Java.

Syntax:
random()

Description:
Because random is a static method of Math, you always use it as Math.random(), rather than as a method of a Math object you created.



Example in HEAD section:

<html>
<head>
<title>Random Function</title>
<script language="javascript">
document.write(Math.random(1));
</script>
</head>
</html>


Example in BODY section:

<html>
<head>
<title>Random Function</title>
</head>
<body>
<script language="javascript">
document.write(Math.random(1));
</script>
</body>
</html>




OUTPUT

0.7415897142562586

JavaScript: Power Function



pow function:
Returns base to the exponent power, that is, baseexponent .
Calculate x raised to y (xy)

Syntax:
pow(x,y)
x is the base number and y is the exponent to which to raise base.

Description:
Because pow is a static method of Math, you always use it as Math.pow(), rather than as a method of a Math object you created.



Example:

<html>
<head>
<title>Power Function</title>

<script language="javascript">
document.write("calculate 5 <sup> 2 </sup> = " + Math.pow(5,2) + "<br>");
document.write("calcuclate 3 <sup> 5 </sup> = " + Math.pow(3,5) + "<br>");
</script>

</head>
</html>



OUTPUT:

calculate 52 = 25
calcuclate 35 = 243

JavaScript: Min Function



Math.min() Function:
Find the minimum number in the array list.

Syntax:
min(number1,number2,.......numbern)

Description:
Because min is a static method of Math, you always use it as Math.min(), rather than as a method of a Math object you created.



Example

<html>
<head>
<title>MIN Function</title>

<script language="javascript">
document.write("The minimum number is " + Math.min(5,8) + " from(5,8)
");
document.write("The minimum number is " + Math.min(-2,-9) + " from(-2,-9)
");
document.write("The minimum number is " + Math.min(7.25,7.30) + " from(7.25,7.30)");
</script>

</head>
</html>



OUTPUT:

The minimum number is 5 from(5,8)
The minimum number is -9 from(-2,-9)
The minimum number is 7.25 from(7.25,7.30)

JavaScript: MAX Function



Math.max() Function:
Find the maximum number in the arraylist.
Syntax:
max(number,numner.........,number)

Description:
Because max is a static method of Math, you always use it as Math.max(), rather than as a method of a Math object you created.



Example:

<html>
<head>
<title>Math.max() Function</title>

<script language="javascript">
document.write("The maximum number is " + Math.max(5,8,10) + " from(5,8,10)
");
document.write("The maximum number is " + Math.max(-4,-7) + " from(-4,-7)
");
</script>

</head>
</html>



OUT PUT

The maximum number is 10 from(5,8,10)
The maximum number is -4 from(-4,-7)

JavaScript: isNaN Function



isNaN Function :-
Evaluates an argument to determine if it is not a number.

Syntax :-
isNaN(value)
value = The value you want to evaluate.

Description :-
isNaN is a top-level function and is not associated with any object.

On platforms that support NaN, the parseFloat and parseInt functions return NaN when they evaluate a value that is not a number. isNaN returns true if passed NaN, and false otherwise.



Example:

<html>
<head>
<title>isNaN Fnction</title>

<script language="javascript">
function check()
{
var phone=f1.phone.value;
if(isNaN(phone))
alert("Characters are not allowed in the Phone Number");
else
alert("Your Phone Number is Accepted");
}
</script>

</head>
<body>

<form name="f1">
Phone: <input type="text" name="phone" size="20">
<input type="button" value="check" onclick="check()">
</form>

</body>
</html>

JavaScript: Squareroot Function



sqrt Function :-
Returns the square root of a number.

Suntax :-
sqrt(number)

Description :-
If the value of number is negative,sqrt returns NaN. Because sqrt is a static method of Math,you always use it as Math.sqrt(), rather than as a method of a Math object you created.



Example:

<html>
<head>
<title>Calculate Squareroot</title>

<script language="javascript">
function calcsqrt()
{
var value=f1.sqrt.value;
alert("The Squareroot of " + value + " is " + Math.sqrt(value));
}
</script>

</head>
<body>

<form name="f1">
<input type="text" name="sqrt" value="Enter Number" size="20">
<input type="button" value="Calculate" onclick="calcsqrt()">
</form>

</body>
</html>

JavaScript: PI Function



PI:
The ratio of the circumference of a circle to its diameter, approximately 3.14159.

Description:
Because PI is a static property of Math, you always use it as Math.PI, rather than as a property of a Math object you created.



Example

<html>
<head>
<title>Calculate PI Value</title>

<script language="javascript">
document.write(Math.PI);
</script>

</head>
</html>


OUTPUT

3.141592653589793

Javascript: Types of Operators



1. Arithmatic Operators :-

1. +(Addition)
2. -(Subtraction)
3. *(Multiplication)
4. /(Division)
5. %(Modules)
6. --(Returns the value then Increment)
7. ++(Returns the value then Decrement)

2. Logical Operators :-

1. &&(Logical AND)
2. ||(Logical OR)
3. !(Logical NOT)


3. Comparison Operators :-

1. ==(Equality)
!=(Not Equal)
3. ===(Strictly Equal)
4. !==(Stricty not Eqaul)
5. <(Less than)
6. >(Greater than)
7. <=(Less than or Equalto)
8. >=(Greater than or Equalto)

4. Assignment Operator :-

=(Equality)

5. Conditional Operator :-

The coditional operator ? and : are sometimes called ternary operators since they take three operand the condition is to be evaluated two alternative values to be written depending on truth or false of the condition.

Synatx:
condition?value1 : value2

6. Special Operator :-

1. Delete Operator: The delete operator is used to delete a object or a element of a array index.

2. New Operator: To create a new object of a type array and assign this array a memory.

Example:
myarray=new Array();

Javascript: FLOOR Function



floor function Returns the largest integer less than or equal to a number.

Syntax:
floor(a number)

Description:
Because floor is a static method of Math, you always use it as Math.floor(), rather than as a method of a Math object you created.


Example in HEAD Section

<html>
<head>
<title>Math.floor function</title>
<script languag="javascript">
document.write("Pass value is -45.65   and return value is = " + Math.floor(45.65) + "<br>");
document.write("Pass value is -45.65   and return value is = " + Math.floor(-45.65));
</script>
</head>
</html>


Example in BODY Section

<html>
<head>
<title>Math.floor function</title>
</head>
<body>
<script languag="javascript">
document.write("Pass value is -45.65   and return value is = " + Math.floor(45.65) + "<br>");
document.write("Pass value is -45.65   and return value is = " + Math.floor(-45.65));
</script>
</body>
</html>




OUTPUT

Pass value is -45.65 and return value is = 45
Pass value is -45.65 and return value is = -46

Javascript: CEIL Function



ceil Function returns the smallest integer greater than or equal to a number.

Syntax:
ceil(a numebr)

Description:
Because ceil is a static method of math, you always use it as Math.ceil(), rather than as a method of a Math object you created.


Example in HEAD Section
<html>
<head>
<title>Math.ceil function</title>
<script language="javascript">
document.write("Pass value is -45.65   and return value is = " + Math.ceil(45.65) + "<br>");
document.write("Pass value is -45.65   and return value is = " + Math.ceil(-45.65));
</script>
</head>
</html>


Example in BODY Section
<html>
<head>
<title>Math.ceil function</title>
</head>
<body>
<script language="javascript">
document.write("Pass value is -45.65   and return value is = " + Math.ceil(45.65) + "<br>");
document.write("Pass value is -45.65   and return value is = " + Math.ceil(-45.65));
</script>
</body>
</html>




OUTPUT

Pass value is -45.65 and return value is = 46
Pass value is -45.65 and return value is = -45

Javascript: BIG Function



big Funtion
                 
Causes a string to be displayed in a big font as if it were in a BIG tag.

Syntax:
big()

Description:
                   
Use the big method with the write or write methods to format and display a string in a document. In server-side JavaScript, use the write function to display the string.



Example:

<html>
<head>
<title>Big function</title>

<script languge="javscript">
function makebig()
{
var name=f1.t1.value.big();
document.write(name);
}
</script>

</head>
<body>

<form name="f1">
<input type="text" name="t1" value="click" size="20">
<input type="button" onclick="makebig()" value="click">
</form>

</body>
</html>

Javascript: ABS Function



abs function returns the absolute of a number.

Syntax

abs(A Number)


Description

Because abs is a static method of Math, you always use it as Math.abs(), rather than as a method of a Math object you created.



<html>
<head>
<title>Math.abs function</title>

<script language="javascript">
document.write("Math.abs(-4564) = " + Math.abs(-4564) + "<br>");
document.write("Math.abs(-5896.56) = " + Math.abs(-5896.56));
</script>

</head>
</html>



OUTPUT

Math.abs(-4564) = 4564
Math.abs(-5896.56) = 5896.56

Javascript: Explorer Properties



<html>
<head>
<title>Explorer Properties</title>

<script language="javascript">
document.write("Appname: " + navigator.appName + "<br>");
document.write("Appversion: " + navigator.appVersion + "<br>");
document.write("Appminorversion: " + navigator.appMinorVersion + "<br>");
document.write("Appcodename: " + navigator.appCodeName + "<br>");
document.write("Platform: " + navigator.platform + "<br>");
document.write("cpuclass: " + navigator.cpuClass + "<br>");
document.write("Useragent: " + navigator.useragent + "<br>");
document.write("CookieEnabled: " + navigator.cookieEnabled + "<br>");
document.write("BrowserLanguage: " + navigator.browserLangugae + "<br>");
document.write("UserLanguage: " + navigator.userLanguage + "<br>");
document.write("SystemLanguage: " + navigator.systemLanguage + "<br>");
document.write("OnLine: " + navigator.onLine + "<br>");
document.write("MimeTypesLength: " + navigator.mimeTypes.Length + "<br>");
document.write("PluginsLength: " + navigator.plugins.Length + "<br>");
document.write("UserProfile: " + navigator.userProfile + "<br>");
</script>

</head>
</html>
Google