Copy Code code as follows:
function Checkip ()
{
var iparray,ip,j;
ip = document.ipform.ip.value;
if (/[a-za-z_-]/.test (IP)) {
if (Ip.indexof ("") >=0) {
IP = ip.replace (//g, "");
Document.ipform.ip.value = IP;
}
if (Ip.tolowercase (). IndexOf ("http://") ==0) {
ip = ip.slice (7);
Document.ipform.ip.value = IP;
}
if (!/^ ([\w-]+\.) + ((COM) | (NET) | (org) | (gov\.cn) | (info) | (cc) | (com\.cn) | (net\.cn) | (org\.cn) | (name) | (Biz) | (TV) | (CN) | (mobi) | (name) | (SH) | (AC) | (IO) | (TW) | (com\.tw) | (HK) | (COM\.HK) | (WS) | (travel) | (US) | (tm) | (LA) | (me\.uk) | (org\.uk) | (ltd\.uk) | (plc\.uk) | (in) | (EU) | (IT) | (JP)) $/.test (IP)) {
Alert ("Not the correct domain name");
Document.ipform.ip.focus ();
return false;
}
}
else{
Iparray = Ip.split (".");
j = Iparray.length
if (j!=4)
{
Alert ("Not the correct IP");
Document.ipform.ip.focus ();
return false;
}
for (Var i=0;i<4;i++)
{
if (iparray[i].length==0 | | iparray[i]>255)
{
Alert ("Not the correct IP");
Document.ipform.ip.focus ();
return false;
}
}
}
}
function Checkmobile () {
var smobile = Document.mobileform.mobile.value
if (!) ( /^1[3|4|5|8][0-9]\d{4,8}$/.test (Smobile))) {
Alert ("Not a full 11-digit cell phone number or the correct number of the top seven");
Document.mobileform.mobile.focus ();
return false;
}
window.open (', ' Mobilewindow ', ' height=197,width=350,status=yes,toolbar=no,menubar=no,location=no ')
}
function Checkzip () {
var szip = Document.zipform.zip.value
if (!) ( /^\d{4,6}$/.test (Szip))) {
Alert ("Please enter the first 4-6 digits of the ZIP code");
return false;
}
window.open (', ' Searchwindow ', ' Height=197,width=400,status=yes,toolbar=no,menubar=no,location=no,resizable=yes , Scrollbars=yes ')
}
function Checkzone () {
var szone = Document.zoneform.zone.value
if (!) ( /^0\d{2,6}$/.test (Szone))) {
Alert ("Please enter a 3-7-bit area code that starts with" 0 ");
return false;
}
window.open (', ' Searchwindow ', ' Height=197,width=400,status=yes,toolbar=no,menubar=no,location=no,resizable=yes , Scrollbars=yes ')
}
function Checkarea2zip () {
var Sarea = Document.area2zipForm.area.value
if (sarea== "") {
Alert ("Please enter Address");
Document.area2zipForm.area.focus ();
return false;
}
if (sarea.length<2) {
Alert ("Address must have at least 2 words");
Document.area2zipForm.area.focus ();
return false;
}
window.open (', ' Searchwindow ', ' Height=197,width=400,status=yes,toolbar=no,menubar=no,location=no,resizable=yes , Scrollbars=yes ')
}
function Checkarea2zone () {
var Sarea = Document.area2zoneForm.area.value
if (sarea== "") {
Alert ("Please enter Address");
Document.area2zoneForm.area.focus ();
return false;
}
if (sarea.length<2) {
Alert ("Address must have at least 2 words");
Document.area2zoneForm.area.focus ();
return false;
}
window.open (', ' Searchwindow ', ' Height=197,width=400,status=yes,toolbar=no,menubar=no,location=no,resizable=yes , Scrollbars=yes ')
}
function Checkid () {
var SID = document. IDform.userid.value
if (!) ( /^\d{15}$|^\d{18}$|^\d{17}[xx]$/.test (SID))) {
Alert ("Please enter 15-or 18-digit ID number");
Document. IDform.userid.focus ();
return false;
}
}
-->
</script>