Check only digits in TExtBox using Javascript

//TextBox indicates the ID of the TextBox in the form
function checknum(TextBox)
{
var str=TextBox.value;
for(i=0;i < str.length;i++)
{
var num=str.charAt(i);
if((num>="0")&&(num<="9"))
{
}
else
{
return(false);
}
}
}

Check Email format using Javascript

function validatemail()
{

var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
var address = document.form1.txtaltermail.value;
if(reg.test(address) == false)
{
return false;
}
else
{
return(true);
}
}
Profile

Author:DotnetWorld
Welcome to FC2!

Latest journals
Latest comments
Latest trackbacks
Monthly archive
Category
Search form
Display RSS link.
Link
Powered by FC2 BLOG

Let's start blogging!!

Powered by FC2 Blog

Friend request form

Want to be friends with this user.