Determine if the contents of the input box are a valid E_Mail address
function Checkisemail (obj,msg)
{
var reg=/^ ([a-za-z0-9_]*) @ ([a-za-z0-9_]*). ([a-za-z0-9]{2,3}) $/
if (!reg.exec (Obj.value))
{
Alert (msg);
Obj.focus ();
return false;
}
return true;
}
Determine if the contents of the input box is a valid ID number
function Checkisid (obj,msg)
{
var reg=/^ ([0-9]{18}) | ([0-9]{15}) $/
if (!reg.exec (Obj.value))
{
Alert (msg);
Obj.focus ();
return false;
}
return true;
}
Determine if the contents of the input box are numbers
function Checkisnumeric (obj,msg)
{
var reg=/^[0-9]*$/
if (!reg.exec (Obj.value))
{
Alert (msg);
Obj.focus ();
return false;
}
return true;
}
Determines whether the entered content is in the correct format of the date
function Checkisdate (obj)
{
var reg=/^ ([0-9]{2,4})/([0-9]{1,2})/([0-9]{1,2}) $/
if (!reg.exec (Obj.value))
{
Alert ("Enter date n format in the following format: 2000/05/25");
Obj.focus ();
return false;
}
return true;
}
Determines if the entered content is in the correct format date (start time)
function Checkisdatese (obj)
{
var reg=/^ ([0-9]{2,4})/([0-9]{1,2}) ~ ([0-9]{2,4})/([0-9]{1,2}) $/
if (!reg.exec (Obj.value))
{
Alert ("Please enter the date n format in the format: 2000/05~2001/11");
Obj.focus ();
return false;
}
return true;
}
Determine if it is a correct user name: Name + number + Underline
function Checkisusername (obj)
{
var reg=/^[0-9a-za-z_]*$/
if (!reg.exec (Obj.value))
{
Alert ("You enter a user name that contains illegal characters!") User names can only be numbers, underscores _, and uppercase and lowercase letters. ");
Obj.focus ();
return false;
}
return true;
}
function Delcheck (str) {
return confirm (str+ "n) are you sure you want to do the delete operation? Delete will not be restored, if not, please press Cancel! ");
}
function Linebr (obj)
{
obj.value+= "<br>";
}