You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
1.7 KiB
JavaScript

function adjustPrice(e) //price select
{
var _sTrNodes = e.parentNode.parentNode.childNodes;//[3].innerHTML ;
var _sPrice = null ;
for(i = 0; i < _sTrNodes.length ;i++ )
{
_sPrice = _sTrNodes[i].innerHTML ;
if(_sPrice!=null&&_sPrice.indexOf("USD") > 0 && _sPrice.indexOf("RMB") > 0 )
{
break;
}
}
if(_sPrice.indexOf("USD") > 0 || _sPrice.indexOf("RMB") > 0)
{
document.getElementById("m_price").innerHTML= _sPrice +"/day";//click change value
document.getElementById("h_price").value = _sPrice;//click
}
}
function judgeform() {
obj=document.getElementById("arrivaltime");
if (obj.value== null || obj.value == ""){
alert("Please fill up Check-in Date!");
obj.focus();
return false;
}
var obj=document.getElementById("realname");
if (obj.value== null || obj.value == ""){
alert("Please fill up your name!");
obj.focus();
return false;
}
obj=document.getElementById("passport");
if (obj.value== null || obj.value == ""){
alert("Please enter the password!");
obj.focus();
return false;
}
obj=document.getElementById("nationality");
if (obj.value== null || obj.value == ""){
alert("Please enter your nationality!");
obj.focus();
return false;
}
obj=document.getElementById("email");
if (obj.value== null || obj.value == ""){
alert("Please fill up your email address!");
obj.focus();
return false;
}
else{
var pattern1 = /^(([\u4E00-\u9FA5]|[\uFE30-\uFEFF]|[\d]|[a-zA-Z]|[\_\-\.])+[\@])(((([\d]|[a-zA-Z]|[\_\-]|[\[\]\{\}\>\<])+[\.])+)([\d]|[a-zA-Z\_\-])+)$/;
str=obj.value
if(!str.match(pattern1) ){
alert("Email error!");
obj.focus();
return false;
}
}
return true;
}