41.What is === operator ?
==== is strict equality operator ,it returns true only when the two operands are having the same value without any type conversion.
42.How to disable an HTML object ?
document.getElementById("myObject").disabled = true;
43.How to create a popup warning box?
alert('Warning: Please enter an integer between 0 and 1000.');
44.How to create a confirmation box?
confirm("Do you really want to launch the missile?");
45.How to create an input box?
prompt("What is your temperature?");
46.How to force a page to go to another page using JavaScript ?
<script language="JavaScript" type="text/javascript" ><!-- location.href="http://rajeshstutorials.blogspt.com"; //--></script>
47.What's Math Constants and Functions using JavaScript?
The Math object contains useful constants such as Math.PI, Math.E
Math.abs(value); //absolute value
Math.max(value1, value2); //find the largest
Math.random() //generate a decimal number between 0 and 1
Math.floor(Math.random()*101) //generate a decimal number between 0 and 100
48.What does the delete operator do?
The delete operator is used to delete all the variables and objects used in the program ,but it does not delete variables declared with var keyword.
49.How to get value from a textbox?
alert(document.getElementById('txtbox1').value);
50.How to get value from dropdown (select) control?
alert(document.getElementById('dropdown1').value);

0 comments:
Post a Comment