W3Schools

home HOME

WMLScript Tutorial
WMLScript HOME
WMLScript Intro
WMLScript How to

WML Libraries
WML Dialogs
WML Float
WML Lang
WML String
WML URL
WML Browser

Selected Reading
Web Statistics
Web Glossary
Web Hosting
Web Quality

W3Schools Forum

Helping W3Schools

WMLScript isFloat() Function


WMLScript Lang Library Complete WMLScript Lang Library

The isFloat() function returns a boolean value that is true if the value parameter can be converted into a floating-point number by the parseFloat() function, and false if not.

Syntax

n = Lang.isFloat(value)

Part Description
n The Boolean value returned from the function
value Any value

Example

var a = Lang.isFloat("576");
var b = Lang.isFloat("-576");
var c = Lang.isFloat("6.5");
var d = Lang.isFloat(" -9.45e2");
var e = Lang.isFloat("@13");
var f = Lang.isFloat("hello");

Result

a = true
b = true
c = true
d = true
e = false
f = false


WMLScript Lang Library Complete WMLScript Lang Library


Learn XML with Stylus Studio XML Editor – Free Download

Stylus Studio provides tools for editing and debugging XML, XSLT, XML Schema, DTD, XQuery, Web Services,and more!

Using Stylus Studio XML Tools You Can:

See why millions use Stylus Studio as their preferred XML tool. Download a FREE TRIAL or watch an online VIDEO DEMO today!




Jump to: Top of Page or HOME or Printer Friendly Printer friendly page

W3Schools provides material for training only. We do not warrant the correctness of its contents. The risk from using it lies entirely with the user. While using this site, you agree to have read and accepted our terms of use and privacy policy.

Copyright 1999-2008 by Refsnes Data. All Rights Reserved.

Validate Validate W3C-WAI level A conformance icon W3Schools was converted to XHTML in December 1999