Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Feedback on: irt.org FAQ Knowledge Base Q1394 How can I prevent the user from typing anything else than the characters 0123456789 and '.' an

irt.org | About | Feedback | 5041 [ previous next ]

Feedback on:
irt.org FAQ Knowledge Base Q1394 How can I prevent the user from typing anything else than the characters 0123456789 and '.' an

Sent by
zaak on Wednesday September 19, 2007 at 15:51:02

Worth:

Length:

Technical:
Not technical enough

Comments:
Try this.....

function validate()
{

if (document.getdate.date.value=='')
{
return false;
}
var pattern= new RegExp('/d+');

if ((pattern.test(document.getdate.date.value))==false) {
return false;
}
return true;
}








Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 21st December 2007. Maintained by: Martin Webb
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.