//引用不同CSS
var boryinScript=document.getElementById("fnScript");
var arr_boryin=boryinScript.src.split('?data=');
var arr_fnScript=arr_boryin[1].split("|");
var lg=arr_fnScript[0];
var menu_current=arr_fnScript[1];
var menu_current_sub=arr_fnScript[2];
var web_structure=arr_fnScript[3];
var location_number=arr_fnScript[4];
var is_detailed=arr_fnScript[5];
var index_module=arr_fnScript[6];
if(menu_current_sub=="0"||menu_current_sub==0) menu_current_sub=menu_current;
document.write("");
document.write("");
document.write("");
document.write("");
document.write("");
document.write("");
document.write("");
document.write("");
if(location_number!="0") {if(menu_current!="index") document.write("");}
if(index_module=="0")
document.write("");
else
{
var arr_index_module=index_module.split(',');
for(i=0;i");
}
}
if(is_detailed=="1") document.write("");
document.write("");
document.write("");
document.write("");
document.write("");
document.write("");
document.write("");
//document.write("");
//引用不同CSS console.log("");
//页面滚动触发
window.addEventListener('scroll',function(){ //window.onscroll = function ()
var filename=$("#filename").html(); //获取当前文件名
var scrollTop = $(this).scrollTop(); //滚动高度
if(document.body.offsetWidth<899)
{
}
},false)
//页面滚动触发
//页面加载完毕后立刻执行
window.onload = function()
{
};
//页面加载完毕后立刻执行
//重新加载验证码,这里必须加入随机数不然地址相同我发重新加载
function reloadcode(CheckCode)
{
document.getElementById(CheckCode).setAttribute('src','/inc_boryin/check_code.php?'+Math.random());
}
//重新加载验证码,这里必须加入随机数不然地址相同我发重新加载
//检测空字符
function checkspace(checkstr) {
var str = '';
for(i = 0; i < checkstr.length; i++) {
str = str + ' ';
}
return (str == checkstr);
}
//检测空字符
//检测电子邮箱格式
function CheckEmail(email)
{
var email_temp=email.replace(/\s+/g,''); //去除空格
var RegExpStr = /^([\w\_\-\.]{1,})(@)([\w\-\.]{1,})(\.)([a-zA-Z\.]{1,})$/;
return RegExpStr.test(email_temp);
}
//检测电子邮箱格式
//显示与隐藏客服
function ShowHideOnline() //500 slow normal fast
{
if($("#onLineClose").is(":hidden")) //如果是隐藏
$("#onLineClose").fadeIn("fast");
else
$("#onLineClose").fadeOut("fast");
if($("#onLine").is(":hidden")) //如果是隐藏
$("#onLine").fadeIn("fast");
else
$("#onLine").fadeOut("fast");
}
//显示与隐藏客服.hide();
//显示与隐藏
function ShowHideDiv(div_id)
{
if($("#"+div_id).is(':hidden'))
$("#"+div_id).fadeIn(500);
else
$("#"+div_id).fadeOut(500);
}
//显示与隐藏
//显示与隐藏弹层下拉框
function ShowHideLayerDiv(div_id)
{
//鼠标经过显示
$("#"+div_id).show();
//弹层开始
$("#"+div_id).hover(function() {
$("#"+div_id).show();
}, function() {
$("#"+div_id).hide();
})
//弹层结束
}
//显示与隐藏弹层下拉框
//N秒后关闭DIV
function countDownDivHide(secs,div_id)
{
$("#"+div_id).fadeIn(1000);
var original_secs=secs; //声明秒数原始值,并赋值
countDown(secs,original_secs,div_id);
}
//定时页面自动跳转
function countDown(secs,original_secs,DivId)
{
$("#jumpTo").html(secs); //赋值给秒数控件
if(--secs>0)
setTimeout("countDown("+secs+","+original_secs+",'"+DivId+"')",1000);
else
{
$("#jumpTo").html(original_secs); //secs达到0后,还原秒数原始值给秒数控件
$("#"+DivId).fadeOut("slow");
}
}
function countRedirect(secs,next_id)
{
//获取当前文件名
var strUrl=window.location.href;
var arrUrl=strUrl.split("/");
var strPage=arrUrl[arrUrl.length-1];
if(strPage.indexOf("?")>-1){
var pageName=strPage.split("?");
strPage=pageName[0];
}
//获取当前文件名
$("#secsCount").html(secs);
if(--secs>0)
setTimeout("countRedirect("+secs+",'"+next_id+"')",1000);
else
document.location.href=strPage+"?id="+next_id;
}
//定时页面自动跳转
//跳转到指定页面
function GoUrl(url)
{
document.location.href=url;
}
//跳转到指定页面
//警告提示
function WarningTips(strTitle,strContent)
{
$("#WarningTips dl").html(strTitle);
$("#WarningTips ul").html(strContent);
$("#WarningTips").show();
}
//警告提示
//防止短时间提交
function MypreTime(TimeNums)
{
Today=new Date();
var NowHour = Today.getHours();
var NowMinute = Today.getMinutes();
var NowSecond = Today.getSeconds();
var mysec=(NowHour*3600)+(NowMinute*60)+NowSecond;
var mypretime=$("#mypretime").val(); //防止重复提交的控件mypretime
//console.log("mysec="+mysec+";mypretime="+mypretime);
if((parseInt(mysec)-parseInt(mypretime))>TimeNums) //TimeNums只是一个数字,不是秒,就是指定时间内禁止重复提交,值随便设 //alert('请不要频繁提交'+mysec+'__'+mypretime);
{
$("#mypretime").val(mysec); //赋值给控件mypretime
return IfAjaxPost=1; //返回可以提交
}
else
{
//alert('请不要频繁提交'+mysec+'__'+mypretime);
return IfAjaxPost=0; //返回不可以提交
}
}
//防止短时间提交
//滑动门显示与隐藏效果
function SlidingDoor(now_nums,all_nums,div_sliding,div_content)
{
for(n=1;n<=all_nums;n++)
{
if(n==now_nums)
{
$("#"+div_sliding+n).addClass("current");
$("#"+div_content+n).show();
}
else
{
$("#"+div_sliding+n).removeClass("current");
$("#"+div_content+n).hide();
}
}
}
//滑动门显示与隐藏效果
//改变Tr背景色
function changeTrColorMove(obj)
{
var _table=obj.parentNode;
for (var i=0;i<_table.rows.length;i++){
_table.rows[i].style.backgroundColor="";
}
obj.style.backgroundColor="#F6F7F9";
}
function changeTrColorOut(obj)
{
var _table=obj.parentNode;
for (var i=0;i<_table.rows.length;i++){
_table.rows[i].style.backgroundColor="";
}
}
//改变Tr背景色
//手机端显示与隐藏
function ShowMenuMP()
{
if($('.menu_full').is(':hidden'))
{
$(".menu_full").fadeIn(0); //$(".menu_full").fadeIn(1000); $(".menu_full").slideDown(1000);
//$("#mask").fadeIn(1000); //整个页面遮罩层显示
//设置滚动条隐藏
document.body.style.overflow="hidden";
document.body.style.height="100%";
}
else
{
$(".menu_full").fadeOut(0); //$(".menu_full").fadeOut(500); $(".menu_full").slideUp(1000);
//$("#mask").fadeOut(500); //整个页面遮罩层消失
//设置滚动条显示
document.body.style.overflow="visible";
document.body.style.height="auto";
}
}
//手机端显示与隐藏
//切换中英文
function ChangeCnEn(lg)
{
var web_url=$("#web_url").html();
//console.log(lg);
if(lg!="")
{
console.log("传递时="+lg);
//请求数据开始
$.ajax({
url:'/ajax.php',
type:'POST',
dataType:'html', //返回数据类型:html,xml,js,json
data:{action:"ChangeCnEn",lg:lg},
success:function(res){
document.location.href=web_url;
}
});
//请求数据结束
}
}
//切换中英文
//更换货币显示文本及图标
function ShowExchangeRate(DivName)
{
$("#translate_switch").hide(); //先隐藏语言层
$("#exchange_rate").show(); //第一次鼠标经过就显示货币层
//货币一级导航开始
$("#exchange_rate_current").hover(function() { //鼠标经过货币一级导航时
$("#exchange_rate").show();
}, function() { //鼠标移出货币一级导航时
// $("#exchange_rate").hide();
})
//货币一级导航结束
//货币二级导航开始
$("#exchange_rate").hover(function() {
$("#exchange_rate").show();
}, function() {
$("#exchange_rate").hide();
})
//货币二级导航结束
}
//更换货币显示文本及图标
//顶部搜索提交
function ShowSearch(search_number)
{
$("#search_full_"+search_number).fadeIn(1000);
if(search_number=="10001"||search_number=="10002")
{
//设置滚动条隐藏
document.body.style.overflow="hidden";
document.body.style.height="100%";
}
if(search_number=="10003")
{
var header_height=$("#header").css("height"); //获取顶部header高度
$(".search_10003").css("top",header_height); //设置搜索框的TOP
//搜索框进行判断显示与隐藏
var search_number_value=$("#search_number_10003").val();
if(search_number_value==0)
{
$("#search_full_10003").fadeIn(1000); //显示
$("#search_number_10003").val(1); //赋值给search_number_10003
}
else
{
$("#search_full_10003").fadeOut(500);
$("#search_number_10003").val(0); //赋值给search_number_10003
}
}
}
function HideSearch(search_number)
{
$("#search_full_"+search_number).fadeOut(500);
if(search_number=="10001")
{
//设置滚动条显示
document.body.style.overflow="visible";
document.body.style.height="auto";
}
}
//顶部搜索提交
//检索搜索是否为空
function CheckSearch(input_name,search_form)
{
var keywords=$("#"+input_name).val();
if(!checkspace(keywords)) $("#"+search_form).submit();
}
//检索搜索是否为空
//提示框显示
function ShowDivTips(DivName)
{
$("#"+DivName).fadeIn("slow");
}
//提示框显示
//售后客服显示
function ShowServiceAftersaleCode(DivName,ImgUrl)
{
$("#"+DivName).fadeIn(500);
$("#"+DivName+" ul").html(""); //先清空,再赋值
$("#"+DivName+" ul").html("");
}
//售后客服显示
//咨询表单弹窗
function DivHide(DivName)
{
$("#"+DivName+"").fadeOut(500);
}
function DivShow(DivName)
{
$("#"+DivName).fadeIn(1000);
}
//检验验证码
function VerificationCode(getcode_name)
{
var lg=$("#lg").html();
var getcode=$("#"+getcode_name).val();
//console.log(getcode);
if(checkspace(getcode))
{
$("#"+getcode_name).removeClass("widthCode");
$("#"+getcode_name).addClass("highlight_border widthCode");
}
else
{
//请求数据开始
$.ajax({
url:'/ajax.php',
type:'POST',
dataType:'html', //返回数据类型:html,xml,js,json
data:{action:"VerificationCode",getcode:getcode},
success:function(res){
//console.log(res);
$("#"+getcode_name+"_ok").val(res);
if(res==1)
{
$("#"+getcode_name).removeClass("highlight_border widthCode");
$("#"+getcode_name).addClass("widthCode");
}
else
{
$("#"+getcode_name).removeClass("widthCode");
$("#"+getcode_name).addClass("highlight_border widthCode");
}
}
});
//请求数据结束
}
}
//检验验证码
//跟踪访客点击(即时聊天工具询盘)
function CheckInquiryClicks(title)
{
var lg=$("#lg").html();
var web_url=$("#web_url").html();
//提交数据开始
IfAjaxPost=MypreTime(10); //10只是一个时间值,返回来1或0
if(IfAjaxPost==1) //IfAjaxPost=0 不能频繁提交
{
//请求数据开始
$.ajax({
url:'/ajax.php',
type:'POST',
dataType:'html', //返回数据类型:html,xml,js,json
data:{action:"InquiryClicks",lg:lg,title:title,web_url:web_url},
success:function(res){
//console.log(res);
}
});
//请求数据结束
}
//提交数据结束
}
//跟踪访客点击(即时聊天工具询盘)
//订阅邮件客户
function CheckInquirySubscribeEmail()
{
var IfAjaxPost=1; //是否AJAX提交
var lg=$("#lg").html();
var jumpTo=$("#jumpTo").html(); //获取默认秒数
var web_url=$("#web_url").html();
var inquiry_subscribe_email=$("#inquiry_subscribe_email").val();
if(checkspace(inquiry_subscribe_email))
{
$("#inquiry_subscribe_email").addClass("highlight_border");
$("#inquiry_subscribe_email").focus();
return false;
}
else
{
if(CheckEmail(inquiry_subscribe_email)==true)
{
IfAjaxPost=MypreTime(10); //20只是一个时间值,返回来1或0
if(IfAjaxPost==1) //IfAjaxPost=0 不能频繁提交
{
//请求数据开始
$.ajax({
url:'/ajax.php',
type:'POST',
dataType:'html', //返回数据类型:html,xml,js,json
data:{action:"InquirySubscribeEmail",lg:lg,inquiry_subscribe_email:inquiry_subscribe_email,web_url:web_url},
success:function(res){
//console.log(res);
if(res!=0)
{
var arr=res.split("∏");
var success=arr[0];
var strTipsDivDl=arr[1];
var strTipsDivUl=arr[2];
//赋值给提示TipsDiv值,指定时间内显示后隐藏
$("#TipsDiv dl").html(strTipsDivDl);
$("#TipsDiv ul").html(strTipsDivUl);
$("#TipsDiv").show();
$("#inquiry_subscribe_email").val(''); //清空输入框内容
countDownDivHide(jumpTo,'TipsDiv'); //N秒后关闭DIV
//赋值给提示TipsDiv值,指定时间内显示后隐藏
}
}
});
//请求数据结束
}
}
}
}
//订阅邮件客户
//网站询盘报价
function CheckInquiry()
{
var IfSubmit=1;
var inquiry_getcode_ok=$("#inquiry_getcode_ok").val();
//填写完毕提交激活检测验证码 //reloadcode('inquiry_checkcode'); 重新刷新一下验证
if(inquiry_getcode_ok==0) VerificationCode('inquiry_checkcode');
if(lg=="cn")
{
if(checkspace($("#inquiry_telephone").val()))
{
IfSubmit=0;
$("#inquiry_telephone").addClass("highlight_border");
}
else
$("#inquiry_telephone").removeClass("highlight_border");
}
else
{
if(checkspace($("#inquiry_email").val()))
{
IfSubmit=0;
$("#inquiry_email").addClass("highlight_border");
}
else
{
if(!CheckEmail($("#inquiry_email").val()))
{
IfSubmit=0;
$("#inquiry_email").addClass("highlight_border");
}
else
$("#inquiry_email").removeClass("highlight_border");
}
}
if(checkspace($("#inquiry_comment").val()))
{
IfSubmit=0;
$("#inquiry_comment").addClass("highlight_border");
}
else
$("#inquiry_comment").removeClass("highlight_border");
if(checkspace($("#inquiry_getcode").val()))
{
IfSubmit=0;
$("#inquiry_getcode").removeClass("widthCode");
$("#inquiry_getcode").addClass("highlight_border widthCode");
}
else
{
if(inquiry_getcode_ok==0)
{
IfSubmit=0;
$("#inquiry_getcode").removeClass("highlight_border widthCode");
$("#inquiry_getcode").addClass("widthCode");
}
}
//如果有未按要求填写项
if(IfSubmit==0)
return false;
else
{
var myform="myformInquiry";
var submitForm="submitInquiryForm";
var inquiry_name=$("#inquiry_name").val();
var inquiry_email=$("#inquiry_email").val();
var inquiry_telephone=$("#inquiry_telephone").val();
var inquiry_comment=$("#inquiry_comment").val();
$("#"+submitForm).attr("disabled",true); //设置提交按钮为不可点,颜色为灰色
//调用提交数据函数
var secs=$("#jumpTo").html(); //获取默认秒数
var web_url=$("#web_url").html();
IfAjaxPost=MypreTime(8); //只是一个时间值,返回来1或0
console.log("IfAjaxPost="+IfAjaxPost);
if(IfAjaxPost==1) //IfAjaxPost=0 不能频繁提交
{
//console.log("开始提交数据="+IfAjaxPost);
$("#"+submitForm).attr("disabled",false); //设置按钮不允许提交
$("#"+myform)[0].reset(); //清空表单数据
$("#InquiryDiv").fadeOut(300); //如果是询盘报价弹层,则隐藏
//ajax请求数据开始
$.ajax({
url:'/ajax.php',
type:'POST',
dataType:'html', //返回数据类型:html,xml,js,json
data:{action:"Inquiry",lg:lg,inquiry_name:inquiry_name,inquiry_email:inquiry_email,inquiry_telephone:inquiry_telephone,inquiry_comment:inquiry_comment,web_url:web_url},
success:function(res){
//console.log(res);
if(res!=0)
{
var arr=res.split("∏");
var success=arr[0];
var strTipsDivDl=arr[1];
var strTipsDivUl=arr[2];
$("#InquiryDiv").fadeOut(); //隐藏表单层
//赋值给提示TipsDiv值,指定时间内显示后隐藏
$("#TipsDiv dl").html(strTipsDivDl);
$("#TipsDiv ul").html(strTipsDivUl);
$("#TipsDiv").show();
countDownDivHide(secs,'TipsDiv'); //N秒后关闭DIV
//赋值给提示TipsDiv值,指定时间内显示后隐藏
}
}
});
//ajax请求数据结束
}
}
}
//网站询盘报价
//网站在线留言
function CheckMessageForm()
{
var IfSubmit=1;
var message_getcode_ok=$("#message_getcode_ok").val();
//填写完毕提交激活检测验证码 //reloadcode('message_getcode'); 重新刷新一下验证
if(message_getcode_ok==0) VerificationCode('message_getcode');
//console.log("message_getcode_ok="+message_getcode_ok);
if(lg=="cn")
{
if(checkspace($("#message_telephone").val()))
{
IfSubmit=0;
$("#message_telephone").addClass("highlight_border");
}
else
$("#message_telephone").removeClass("highlight_border");
}
else
{
if(checkspace($("#message_email").val()))
{
IfSubmit=0;
$("#message_email").addClass("highlight_border");
}
else
{
if(!CheckEmail($("#message_email").val()))
{
IfSubmit=0;
$("#message_email").addClass("highlight_border");
}
else
$("#message_email").removeClass("highlight_border");
}
}
if(checkspace($("#message_comment").val()))
{
IfSubmit=0;
$("#message_comment").addClass("highlight_border");
}
else
$("#message_comment").removeClass("highlight_border");
if(checkspace($("#message_getcode").val()))
{
IfSubmit=0;
$("#message_getcode").removeClass("widthCode");
$("#message_getcode").addClass("highlight_border widthCode");
}
else
{
if(message_getcode_ok==0)
{
IfSubmit=0;
$("#message_getcode").removeClass("highlight_border widthCode");
$("#message_getcode").addClass("widthCode");
}
}
//如果有未按要求填写项
if(IfSubmit==0)
return false;
else
{
var myform="myformMessage";
var submitForm="submitMessageForm";
var message_name=$("#message_name").val();
var message_email=$("#message_email").val();
var message_telephone=$("#message_telephone").val();
var message_comment=$("#message_comment").val();
$("#"+submitForm).attr("disabled",true); //设置提交按钮为不可点,颜色为灰色
//调用提交数据函数
var secs=$("#jumpTo").html(); //获取默认秒数
var web_url=$("#web_url").html();
$("#"+myform)[0].reset(); //清空表单数据
//提交数据开始
IfAjaxPost=MypreTime(10); //20只是一个时间值,返回来1或0
if(IfAjaxPost==1) //IfAjaxPost=0 不能频繁提交
{
$("#"+submitForm).attr("disabled",false); //设置按钮不允许提交
//ajax请求数据开始
$.ajax({
url:'/ajax.php',
type:'POST',
dataType:'html', //返回数据类型:html,xml,js,json
data:{action:"OnlineMessage",lg:lg,message_name:message_name,message_email:message_email,message_telephone:message_telephone,message_comment:message_comment,web_url:web_url},
success:function(res){
//console.log(res);
if(res!=0)
{
var arr=res.split("∏");
var success=arr[0];
var strTipsDivDl=arr[1];
var strTipsDivUl=arr[2];
//赋值给提示TipsDiv值,指定时间内显示后隐藏
$("#TipsDiv dl").html(strTipsDivDl);
$("#TipsDiv ul").html(strTipsDivUl);
$("#TipsDiv").show();
countDownDivHide(secs,'TipsDiv'); //N秒后关闭DIV
//赋值给提示TipsDiv值,指定时间内显示后隐藏
}
}
});
//ajax请求数据结束
}
//提交数据结束
}
}
//网站在线留言
//网站索要样品
function CheckSampleForm()
{
var IfSubmit=1;
var sample_getcode_ok=$("#sample_getcode_ok").val();
//填写完毕提交激活检测验证码 reloadcode('exhibition_checkcode'); 重新刷新一下验证
if(sample_getcode_ok==0) VerificationCode('exhibition_checkcode');
if(checkspace($("#sample_telephone").val()))
{
IfSubmit=0;
$("#sample_telephone").addClass("highlight_border SampleTelephone");
}
else
$("#sample_telephone").removeClass("highlight_border");
if(checkspace($("#sample_comment").val()))
{
IfSubmit=0;
$("#sample_comment").addClass("highlight_border");
}
else
$("#sample_comment").removeClass("highlight_border");
if(checkspace($("#sample_getcode").val()))
{
IfSubmit=0;
$("#sample_getcode").addClass("highlight_border widthCode");
}
else
{
if($("#sample_getcode_ok").val()==0)
{
IfSubmit=0;
$("#sample_getcode").removeClass("highlight_border widthCode");
}
}
//console.log(IfSubmit);
//如果有未按要求填写项
if(IfSubmit==0)
return false;
else
{
var myform="myformSample";
var submitForm="submitSampleForm";
var sample_telephone=$("#sample_telephone").val();
var sample_name=$("#sample_name").val();
var sample_company=$("#sample_company").val();
var sample_email=$("#sample_email").val();
var sample_comment=$("#sample_comment").val();
//调用提交数据函数
$("#"+submitForm).attr("disabled",true); //设置提交按钮为不可点,颜色为灰色
//调用提交数据函数
var secs=$("#jumpTo").html(); //获取默认秒数
var web_url=$("#web_url").html();
$("#"+myform)[0].reset(); //清空表单数据
//提交数据开始
IfAjaxPost=MypreTime(10); //20只是一个时间值,返回来1或0
if(IfAjaxPost==1) //IfAjaxPost=0 不能频繁提交
{
$("#"+submitForm).attr("disabled",false); //设置按钮不允许提交
//ajax请求数据开始
$.ajax({
url:'/ajax.php',
type:'POST',
dataType:'html', //返回数据类型:html,xml,js,json
data:{action:"Sample",lg:lg,sample_telephone:sample_telephone,sample_name:sample_name,sample_company:sample_company,sample_email:sample_email,sample_comment:sample_comment,web_url:web_url},
success:function(res){
//console.log(res);
if(res!=0)
{
var arr=res.split("∏");
var success=arr[0];
var strTipsDivDl=arr[1];
var strTipsDivUl=arr[2];
//赋值给提示TipsDiv值,指定时间内显示后隐藏
$("#TipsDiv dl").html(strTipsDivDl);
$("#TipsDiv ul").html(strTipsDivUl);
$("#TipsDiv").show();
countDownDivHide(secs,'TipsDiv'); //N秒后关闭DIV
//赋值给提示TipsDiv值,指定时间内显示后隐藏
}
}
});
//ajax请求数据结束
}
//提交数据结束
}
}
//网站索要样品
//展会预约
function CheckExhibition()
{
var secs=$("#jumpTo").html(); //获取默认秒数
var web_url=$("#web_url").html();
var IfSubmit=1;
var exhibition_getcode_ok=$("#exhibition_getcode_ok").val();
//填写完毕提交激活检测验证码 reloadcode('exhibition_checkcode'); 重新刷新一下验证
if(exhibition_getcode_ok==0) VerificationCode('exhibition_checkcode');
if(checkspace($("#exhibition_person").val()))
{
IfSubmit=0;
$("#exhibition_person").addClass("highlight_border");
}
else
$("#exhibition_person").removeClass("highlight_border");
if(checkspace($("#exhibition_email").val()))
{
IfSubmit=0;
$("#exhibition_email").addClass("highlight_border");
}
else
$("#exhibition_email").removeClass("highlight_border");
if(checkspace($("#exhibition_getcode").val()))
{
IfSubmit=0;
$("#exhibition_getcode").removeClass("widthCode");
$("#exhibition_getcode").addClass("highlight_border");
}
else
{
if(exhibition_getcode_ok==0)
{
IfSubmit=0;
$("#exhibition_getcode").removeClass("highlight_border widthCode");
$("#exhibition_getcode").addClass("widthCode");
}
}
//如果有未按要求填写项
if(IfSubmit==0)
return false;
else
{
var exhibition_title=$("#exhibition_title").val();
var exhibition_country=$("#exhibition_country").val();
var exhibition_company=$("#exhibition_company").val();
var exhibition_person=$("#exhibition_person").val();
var exhibition_position=$("#exhibition_position").val();
var exhibition_email=$("#exhibition_email").val();
var exhibition_telephone=$("#exhibition_telephone").val();
var exhibition_date=$("#exhibition_date").val();
var exhibition_time=$("#exhibition_time").val();
//调用提交数据函数
$("#submitExhibitionForm").attr("disabled",true); //设置提交按钮为不可点,颜色为灰色
$("#exhibition_form")[0].reset(); //清空表单数据
$("#exhibition_form_div").fadeOut(300); //如果是询盘报价弹层,则隐藏
//提交数据开始
IfAjaxPost=MypreTime(10); //20只是一个时间值,返回来1或0
if(IfAjaxPost==1) //IfAjaxPost=0 不能频繁提交
{
//ajax请求数据开始
$.ajax({
url:'/ajax.php',
type:'POST',
dataType:'html', //返回数据类型:html,xml,js,json
data:{action:"Exhibition",lg:lg,exhibition_title:exhibition_title,exhibition_country:exhibition_country,exhibition_company:exhibition_company,exhibition_person:exhibition_person,exhibition_position:exhibition_position,exhibition_email:exhibition_email,exhibition_telephone:exhibition_telephone,exhibition_date:exhibition_date,web_url:web_url},
success:function(res){
//console.log(res);
if(res!=0)
{
var arr=res.split("∏");
var success=arr[0];
var strTipsDivDl=arr[1];
var strTipsDivUl=arr[2];
//赋值给提示TipsDiv值,指定时间内显示后隐藏
$("#TipsDiv dl").html(strTipsDivDl);
$("#TipsDiv ul").html(strTipsDivUl);
$("#TipsDiv").show();
countDownDivHide(secs,'exhibition_form_div'); //N秒后关闭DIV
//赋值给提示TipsDiv值,指定时间内显示后隐藏
}
}
});
//ajax请求数据结束
}
//提交数据结束
}
}
//展会预约
//客户选型
function CheckSelectionForm()
{
var IfAjaxPost=1; //是否AJAX提交
var IfSubmit=1;
var lg=$("#lg").html();
var size=$("#size").val();
var voltage=$("#voltage").val();
var current=$("#current").val();
var speed=$("#speed").val();
var power=$("#power").val();
var air_flow_cfm=$("#air_flow_cfm").val();
var pressure_mmaq=$("#pressure_mmaq").val();
var noise=$("#noise").val();
if(checkspace(size)&&checkspace(voltage)&&checkspace(current)&&checkspace(speed)&&checkspace(power)&&checkspace(air_flow_cfm)&&checkspace(pressure_mmaq)&&checkspace(noise)) IfSubmit=0;
if(IfSubmit==0)
return false;
else
{
//ajax请求数据开始
$.ajax({
url:'/ajax.php',
type:'POST',
dataType:'html', //返回数据类型:html,xml,js,json
data:{action:"Selection",lg:lg,size:size,voltage:voltage,current:current,speed:speed,power:power,air_flow_cfm:air_flow_cfm,pressure_mmaq:pressure_mmaq,noise:noise},
success:function(res){
//console.log(res);
$(".customer_service_selection").html(res);
}
});
//ajax请求数据结束
}
}
//客户选型