The Artima Developer Community
Sponsored Link

Java Buzz Forum
JavaScript number validation

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Goldy Lukka

Posts: 1008
Nickname: xyling
Registered: Jan, 2004

Goldy Lukka is a Java Developer and an Entrepreneur. He is Founder of xyling.com.
JavaScript number validation Posted: Aug 2, 2005 5:01 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Goldy Lukka.
Original Post: JavaScript number validation
Feed Title: Xyling Java Blogs
Feed URL: http://www.javablogs.xyling.com/thisWeek.rss
Feed Description: Your one stop source for Java Related Resources.
Latest Java Buzz Posts
Latest Java Buzz Posts by Goldy Lukka
Latest Posts From Xyling Java Blogs

Advertisement
Recently, I struggled for a code that could validate my html form's textbox that should accept only number.
Following is the code to validate whether the text inside an input like textbox is a number or not.

document.form_name.input_name.value.match(/^\d+$/)

Of course, you need to replace form_name and input_name with respective values in your html form.

This returns true or false based on the input type containing number only or alphanumeric characters.

[Resource-Type: Source Code; Category: JavaScript; XRating: 5]

Read: JavaScript number validation

Topic: SYS-CON - “unethical money grabbers?” Previous Topic   Next Topic Topic: Why do IT people really bash Windows?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use