setTimeout(function(){ window.scrollTo(0,0); },100) //鍒ゆ柇鏄笉鏄痯c function IsPC() { var userAgentInfo = navigator.userAgent; var Agents = ["Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"]; var flag = true; for (var v = 0; v < Agents.length; v++) { if (userAgentInfo.indexOf(Agents[v]) > 0) { flag = false; break; } } return flag; } if(IsPC()){ $(".wraps").css("display","block") $(".phonewrap").css("display","none") }else{ $(".wraps").css("display","none") $(".phonewrap").css("display","block") } //鍑虹幇浜岀淮鐮 function kksb(){ $(".kksb").css("display","block") } function kkzn(){ $(".kkzn").css("display","block") } function join(){ window.location.href="./lib/join.html" } //娑堝け浜岀淮鐮 function cls(){ $(".kksb").css("display","none") } function clz(){ $(".kkzn").css("display","none") } function core(){ window.location.href="lib/core.html" } function ins(){ window.location.href="lib/introduce.html" } function news(){ window.location.href="lib/news.html" } function about(){ window.location.href="lib/about.html" } // function change(){ console.log($(".side").css("display")) if($(".side").css("display")=="block"){ $(".ox").attr("src","img/homepage/open.png") $(".side").animate({ right:-300 },function(){ $(".side").css("display","none") }) }else{ $(".ox").attr("src","img/homepage/close.png") $(".side").css("display","block") $(".side").animate({ right:0 }) } } function isIE() { //ie? if (!!window.ActiveXObject || "ActiveXObject" in window) { return true; } else { return false; } } function ajust(){ var standardWidth=2000 var clientWidth = document.documentElement.clientWidth; var clientHeight = document.documentElement.clientHeight; var scrollHeight= document.body.scrollHeight var scale = clientWidth / standardWidth; if(scale>1){ $(".wrap").css("width","100%") return } var height = clientHeight / scale; $(".wrap").css({ "width": standardWidth,"-moz-transform-origin":"0 0", "-moz-transform": "scale(" + scale + ")", "-o-transform": "scale(" + scale + ")", "zoom": scale }); window.onload=function(){ $(".wrap1").height($(".wrap").height() * scale); $('.wrap1').css("overflow","hidden") } } function ajust2(){ var standardWidth=2000 var clientWidth = document.documentElement.clientWidth; var clientHeight = document.documentElement.clientHeight; var scrollHeight= document.body.scrollHeight var scale = clientWidth / standardWidth; if(scale>1){ $(".wrap").css("width","100%") return } var height = clientHeight / scale; $(".wrap").css({ "width": standardWidth,"-moz-transform-origin":"0 0", "-moz-transform": "scale(" + scale + ")", "-o-transform": "scale(" + scale + ")", "zoom": scale }); if(window.onload){ $(".wrap1").height($(".wrap").height() * scale); $('.wrap1').css("overflow","hidden") var onload_random='onload'+Math.random(); window[onload_random]=window.onload; window.慰nl慰ad=function(){ window[onload_random](); }; } else{ window.慰nl慰ad=function(){ $(".wrap1").height($(".wrap").height() * scale); $('.wrap1').css("overflow","hidden") }; } } ajust() $(window).resize(function(){ ajust2() })