var aboutswiper = new swiper('.swiper-container.ryzz', { autoplay: 5000, loop: true, prevbutton: '.swiper-button-prev.ryzz-prev', nextbutton: '.swiper-button-next.ryzz-next', }) $(".box-nav li").each(function() { if ($(this).find("a").text() == $(".location a:last-child").text()) { $(this).find("a").css({ 'height': '49px', 'border-bottom': '2px solid #006c7c', 'color': '#006c7c', 'transition': 'none' }) } }) // $("a").attr("target","_blank") window.onscroll = function() { scrollfunction() }; function scrollfunction() { var topheight ='' if(window.screen.width<979){ topheight=219 }else{ topheight = $(".top").height()+$(".box-tit").height()+110 } if (document.body.scrolltop > topheight || document.documentelement.scrolltop > topheight) { $(".box-top-nav").addclass("fixed") if(window.screen.width<979){ $(".location").addclass("dp") } } else { $(".box-top-nav").removeclass("fixed") if(window.screen.width<979){ $(".location").removeclass("dp") } } } $(".ab-box3-tit ul li").hover(function() { var index = $(this).index() $(this).find("b").addclass("active").parent().siblings().children("b").removeclass() $(".ab-box3-cn").eq(index).addclass("sh").siblings().removeclass("sh") }) $(".newshow-cn p img").parent().css({ 'text-align': 'center' }) $(".form-info input").blur(function() { // case1: if ($(this).val() == null || $(this).val() == "") { // alert("信息不能为空") // return // } case1: if ($(this).attr('id') == 'phone') { var userphone = $.trim($('#phone').val()); var phonereg = /^[1][3|5|8][0-9]{9}$/;; //定义邮箱的正则表达式 if (!phonereg.test(userphone)) { alert("您输入的手机号格式不正确"); return false; } } case2: if ($(this).attr('id') == 'email') { var useremail = $.trim($('#email').val()); //获取用户输入的邮箱值 var emailreg = /^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/; //定义邮箱的正则表达式 if (!emailreg.test(useremail)) { alert("您输入的email地址格式不正确!"); return false; } } }) $(".info-btn").click(function() { var position = $("#position").val(); //html表单的内容 var name = $("#name").val(); var sex = $("#sex").val(); var education = $("#education").val(); var major = $("#major").val(); var age = $("#age").val(); var native = $("#native").val(); var phone = $("#phone").val(); var email = $("#email").val(); if(position != ""&&name !=""&&sex !=""&&education !=""&&major !=""&&age !=""&&native !=""&&phone !=""&&email !=""){ $.ajax({ url: '/common/extchange.aspx?extgroupidentify=ypxx&action=insert', //lyb=jcms自助表单表单标识 type: 'post', datatype: 'json', data: { position: position, name: name, sex: sex, education: education, major: major, age: age, native: native, phone: phone, email: email }, success: function(data) { alert(data.msg); window.location.reload(); //提交成功刷新页面 } }) }else{ alert("请填写完整相关信息!") } }) $(".video-img").click(function(){ $(this).toggleclass("dp") $(".index-play video").toggleclass("dp") }) $(".about-play a").click(function(){ $(".about-play").toggleclass("dp") $(".play-box video").toggleclass("dp") }) if(window.screen.width>979){ var proshht1=$(".prosh-box2").height()+2 var proshht2=$(".prosh-box1").height()+140 if(proshht1>proshht2){ $(".prosh-box1").css({ 'height':proshht1 }) } } /*phone*/ $(".menu").click(function() { $(".ph-nav").slidetoggle(300) }) $(".play-img").click(function(){ $(this).hide() }) $(".contact-cn ul li span").css({ 'background-size':"auto 100%" }) if(window.screen.width<980){ $(".indexnewsbox .indexnews_show:nth-child(4)").css('display','none') } $(window).resize(function(){ if(window.screen.width<980){ $(".indexnewsbox .indexnews_show:nth-child(4)").css('display','none') }else{ $(".indexnewsbox .indexnews_show:nth-child(4)").css('display','block') } }); $(".newshow-cn p").each(function(){ var txt = $(this).find('span').text() var n = txt.indexof("附件") if(n==0){ $(this).find('img').css({ 'width':'auto', 'height':'auto' }) } }) $(".mk-form-info input").blur(function() { case1: if ($(this).attr('id') == 'phone') { var userphone2 = $.trim($('#phone').val()); var phonereg2 = /^[1][3|5|8][0-9]{9}$/;; //定义邮箱的正则表达式 if (!phonereg2.test(userphone2)) { alert("您输入的手机号格式不正确"); return false; } } }) $(".mk-btn").click(function() { var product = $("#product").val(); //html表单的内容 var spec = $("#spec").val(); var quantity = $("#quantity").val(); var require = $("#require").val(); var phone = $("#phone").val(); var name = $("#name").val(); if(product != ""&&spec !=""&&quantity !=""&&phone !=""&&name !=""){ $.ajax({ url: '/common/extchange.aspx?extgroupidentify=orderinfo&action=insert', //lyb=jcms自助表单表单标识 type: 'post', datatype: 'json', data: { product: product, spec: spec, quantity: quantity, require: require, phone: phone, name: name }, success: function(data) { alert(data.msg); window.location.reload(); //提交成功刷新页面 } }) }else{ alert("请填写完整相关信息!") } }) $('.numto').lemcounter();