// javascript document // javascript document /* document.oncontextmenu=new function("event.returnvalue=false;"); document.onselectstart=new function("event.returnvalue=false;"); document.body.onselectstart = document.body.ondrag = function(){ return false; } */ /*document.onkeydown = function(){ if(window.event && window.event.keycode == 123) { event.keycode=0; event.returnvalue=false; } if(window.event && window.event.keycode == 13) { window.event.keycode = 505; } if(window.event && window.event.keycode == 8) { window.event.returnvalue=false; } } var img=$("img"); img.on("contextmenu",function(){return false;}); img.on("dragstart",function(){return false;});//禁止图片拖拽 document.oncontextmenu = function (event){ if(window.event){ event = window.event; }try{ var the = event.srcelement; if (!((the.tagname == "input" && the.type.tolowercase() == "text") || the.tagname == "textarea")){ return false; } return true; }catch (e){ return false; } } //屏蔽键盘事件 document.onkeydown = function (){ var e = window.event || arguments[0]; //f12 if(e.keycode == 123){ return false; //ctrl+shift+i }else if((e.ctrlkey) && (e.shiftkey) && (e.keycode == 73)){ return false; //shift+f10 }else if((e.shiftkey) && (e.keycode == 121)){ return false; //ctrl+u }else if((e.ctrlkey) && (e.keycode == 85)){ settimeout(function(){   },1); return false; } }; //屏蔽鼠标右键 document.oncontextmenu = function (){ settimeout(function(){   },1); return false; }*/ $('.container04 ul').miso({ autoplay: true, slidestoshow: 8, responsive: [{ breakpoint: 1200, settings: { slidestoshow: 6, slidestoscroll: 1 } }, { breakpoint: 768, settings: { slidestoshow: 5, slidestoscroll: 1 } }, { breakpoint: 456, settings: { slidestoshow: 4, slidestoscroll: 1 } }] }); $('.container05 .miso_hd ul').miso({ autoplay: false, slidestoshow: 4, asnavfor: '.container05 .miso_bd' }); $('.container05 .miso_bd').miso({ autoplay: false, fade:true, asnavfor: '.container05 .miso_hd ul' }); $("footer .bottom dl dt").click(function(){ $("footer .bottom dl .con").slidetoggle(); }); let _$ = function (select) { return document.queryselectorall(select); }; function chinatextlist1() { array.prototype.foreach.call(_$('.chinalist'), function (item) { let arrays = item.innertext.split(""); // .replace(/\s*/g, "") 去掉空格 item.innerhtml = ''; let delays = parseint(item.getattribute('delay')); if(!delays){ delays = 300 } array.prototype.foreach.call(arrays,function(letter, i) { let span = document.createelement("span"); let br = document.createelement("br"); if(letter == '<'){ item.appendchild(br); return } if(letter == 'b' || letter == 'r' || letter == '>'){ return } span.innerhtml = letter; delays += 100; span.style.animationdelay = delays + 'ms'; // let random = math.random(); // span.style.animationdelay = delays * random + 'ms'; 随机延迟 item.appendchild(span); }); }); }; function uktextlist1() { array.prototype.foreach.call(_$('.uklist'), function (item) { let arrays = item.innertext.split(""); item.innerhtml = ''; let delays = 300; array.prototype.foreach.call(arrays,function(letter, i) { let span = document.createelement("span"); let br = document.createelement("br"); if(letter == '<'){ item.appendchild(br); return } if(letter == 'b' || letter == 'r' || letter == '>'){ return } span.innerhtml = letter; delays += 100; span.style.animationdelay = delays + 'ms'; item.appendchild(span); }); }); }; chinatextlist1(); //中文字分割 uktextlist1(); //英文字分割 $(".chinalist, .uklist").addclass("active"); $(".n_nav a").hover(function() { $(this).stop().addclass("on"); $(this).siblings().stop().removeclass("on"); }, function() { $(this).stop().removeclass("on"); $(".n_nav a.on1").stop().addclass("on"); }); $(".list_box_11 li").hover(function() { $(this).stop().addclass("on"); $(this).siblings().stop().removeclass("on"); }, function() { $(this).stop().removeclass("on"); $(".list_box_11 li.on1").stop().addclass("on"); }); $(".list_box_17 li").hover(function() { $(this).stop().addclass("on"); $(this).siblings().stop().removeclass("on"); }, function() { $(this).stop().removeclass("on"); $(".list_box_17 li.on1").stop().addclass("on"); }); $(function(){ $(".banner").addclass("on"); var smvideo = { load: function (objs) { var objplay = jwplayer(objs.vcontainer).setup({ html5player: '/static/style/pc/js/video/html5player.js', file: objs.vfiles, image: objs.vfimg, width: '100%', height: '100%', aspectratio: '16:9', stretching: 'fill', controls: 'true', autostart: objs.isautoplay }); return objplay; } } $('.n_about .fl01 .right .top1 a, .n_jiazhi .fl02 .box a').click(function () { smvideo.load({ vcontainer: 'videobox', //视频容器 vfiles: jquery(this).attr("data-video"), //视频地址 vfimg: jquery(this).attr("data-img"), //视频缩略图(封面) isautoplay: 'true' }); $(".vwrap").fadein(); }); $(".vwrap .close").click(function () { $(".vwrap").hide(); $('#videobox').html(""); }); //移动端导航 $("#m_nav .title .list").css({"opacity":"1","visibility":"visible"}); /* $("#m_nav .title .a").attr("href","javascript:void(0)"); $("#m_nav .title .void>a").attr("href","javascript:void(0)");*/ $("#m_nav .title i").click(function(){ var tt = $(this).parents(".title"); if ($(tt).hasclass('on')) { $(tt).children(".list").slideup(600); //展开 $(tt).removeclass("on"); }else{ $("#m_nav .title ").removeclass("on"); $("#m_nav .title .list").slideup(); $(tt).children(".list").slidedown(); $(tt).toggleclass("on"); } }); /*$("#m_nav .sub").hide(); $("#m_nav .void").click(functon(){ $(this).children(".sub").slidetoggle(); //展开 });*/ $("#nav_btn_box").click(function(){ $("#nav_btn_box .point").toggleclass("on"); $("#nav_btn_box").toggleclass("on"); $("#m_nav").toggleclass("act"); $(".nav_mask").fadetoggle(); }); $(".nav_mask").click(function(){ $("#nav_btn_box .point").removeclass("on"); $("#nav_btn_box").removeclass("on"); $(this).fadetoggle(); $(".nav_btn_box").removeclass("act"); $("#m_nav").removeclass("act"); }) $("#m_nav .close").click(function(){ $("#nav_btn_box .point").removeclass("on"); $("#nav_btn_box").removeclass("on"); $(".nav_btn_box").removeclass("act"); $("#m_nav").removeclass("act"); $(".nav_mask").fadeout(); }) //移动端内页导航 $("#bnt_sub_nav").click(function(){ $(this).toggleclass("on"); $("#sub_nav_content").slidetoggle(); }); $("#sub_nav_content dt.title a").attr("href","javascript:void(0)"); $("#sub_nav_content dt.title_on").next("dd").show(); $("#sub_nav_content dt.title").click(function() { if ($(this).hasclass("title_on")) { $(this).next("dd").slidetoggle(); $(this).removeclass("title_on"); } else { $("#sub_nav_content dd").slideup(); $("#sub_nav_content dt.title").removeclass("title_on").removeclass("on"); $(this).toggleclass("title_on"); $(this).next("dd").slidedown(); } }); $('.search_btn').on('click',function(){ $('.search-dialog-box').toggleclass("on"); }) $('.search-dialog-box .pub-close').on('click',function(){ $('.search-dialog-box').removeclass("on"); }) //ie9 兼容placdholder属性 function placeholdersupport() { return 'placeholder' in document.createelement('input'); } if(!placeholdersupport()){ // 判断浏览器是否支持 placeholder $("[placeholder]").each(function(){ var _this = $(this); // console.log($(this).height()); var inputheight = parseint(parseint($(this).height()-2)-14)/2; var inputheight = parseint(parseint(parseint($(this).height()-2)/2)-7)+'px'; _this.parent().css({"position": "relative"}); var left = _this.position().left+parseint(_this.css("padding-left"))+parseint(_this.css("margin-left"))+"px"; var top = parseint(_this.css("padding-top"));//+parseint(_this.css("margin-top"))+"px"; var top = parseint(_this.css("padding-top"));//+parseint(_this.css("margin-top"))+"px"; _this.after('' + _this.attr("placeholder") + ''); //_this.after('' + _this.attr("placeholder") + ''); if(_this.val() != ""){ _this.parent().find("span.placeholder").hide(); } else{ _this.parent().find("span.placeholder").show(); } }).on("focus", function(){ $(this).parent().find("span.placeholder").hide(); }).on("blur", function(){ var _this = $(this); if(_this.val() != ""){ _this.parent().find("span.placeholder").hide(); } else{ _this.parent().find("span.placeholder").show(); } }); // 点击表示placeholder的标签相当于触发input $("span.placeholder").on("click", function(){ $(this).hide(); $(this).siblings("[placeholder]").trigger("click"); $(this).siblings("[placeholder]").trigger("focus"); }); } /*$('.container00 .miso_hd').miso({ autoplayspeed: 6000, autoplay: false, speed: 300, slidestoshow: 3, slidestoscroll: 1, arrows: false, dots:false, touchthreshold: 10, pauseonhover: false, focusonselect: true, asnavfor: '.container00 .miso_bd' }); $('.container00 .miso_bd').miso({ autoplayspeed: 6000, autoplay: false, speed: 300, slidestoshow: 1, slidestoscroll: 1, arrows: false, dots:false, touchthreshold: 10, pauseonhover: false, focusonselect: true, asnavfor: '.container00 .miso_hd' }); var smvideo = { load: function (objs) { var objplay = jwplayer(objs.vcontainer).setup({ html5player: '/static/style/pc/js/video/html5player.js', file: objs.vfiles, image: objs.vfimg, width: '100%', height: '100%', aspectratio: '16:9', stretching: 'fill', controls: 'true', autostart: objs.isautoplay }); return objplay; } } $('').click(function () { smvideo.load({ vcontainer: 'videobox', //视频容器 vfiles: jquery(this).attr("data-video"), //视频地址 vfimg: jquery(this).attr("data-img"), //视频缩略图(封面) isautoplay: 'true' }); $(".vwrap").fadein(); }); $(".vwrap .close").click(function () { $(".vwrap").hide(); $('#videobox').html(""); });*/ });