How to test for bad numbers using JavaScript?
Submitted by: AdministratorThe global method, "isNaN()" can tell us about value if a number has gone bad in JavaScript.
var temperature = parseFloat(myTemperatureWidget.value);
if(!isNaN(temperature)) {
alert("Please enter a valid temperature.");
}
Submitted by: Administrator
var temperature = parseFloat(myTemperatureWidget.value);
if(!isNaN(temperature)) {
alert("Please enter a valid temperature.");
}
Submitted by: Administrator
Read Online JavaScript Job Interview Questions And Answers
Top JavaScript Questions
☺ | How to force a page to go to another page using JavaScript? |
☺ | How to make elements invisible? |
☺ | What looping structures are there in JavaScript? |
☺ | How about 2+5+"8"? |
☺ | What is the difference between an alert box and a confirmation box? |
Top Top World Wide Web Categories
☺ | Cascading Style Sheet CSS Interview Questions. |
☺ | HTML5 Interview Questions. |
☺ | Basic Internet Interview Questions. |
☺ | Domain Name System (DNS) Interview Questions. |
☺ | JavaScript Interview Questions. |