//input $(function(){ $(".Text").focus(function(){ if($(this).val() == this.defaultValue){ $(this).val(""); }; }); $(".Text").blur(function(){ if ($(this).val() == ""){ $(this).val(this.defaultValue); }; }); }); // $(function(){ // $(".header .nav .ls").hover(function(){ // var a_le = $(this).find("ul").find("li").length; // $(this).find("ul").css("width",a_le*120) // if(a_le>0){ // $(".header .nav_bac").stop().animate({'height':'50'}); // $(this).find("ul").stop().animate({'height':'50'}) // }else{ // $(".header .nav_bac").stop().animate({'height':'0'}); // $(this).find("ul").stop().animate({'height':'0'}) // } // },function(){ // $(".header .nav_bac").stop().animate({'height':'0'}); // $(this).find("ul").stop().animate({'height':'0'}) // }) // }) $(function(){ $(".m_click .icon_1").click(function(){ $(".footer .Messages").addClass("ans"); }); $(".footer .Messages .t span").click(function(){ $(".footer .Messages").removeClass("ans"); }); $(".header .se").click(function(){ $(".header .search").addClass("block"); }); $(".header .search .w1500 span").click(function(){ $(".header .search").removeClass("block"); }); $(".fl .icon_3").click(function(){ if($(this).hasClass("cur")){ $(this).removeClass("cur"); $(".fl .weixin").css("display","none") }else{ $(this).addClass("cur"); $(".fl .weixin").css("display","block") } }); }) //杩斿洖椤堕儴 function gotoTop(acceleration,stime) { acceleration = acceleration || 0.1; stime = stime || 10; var x1 = 0; var y1 = 0; var x2 = 0; var y2 = 0; var x3 = 0; var y3 = 0; if (document.documentElement) { x1 = document.documentElement.scrollLeft || 0; y1 = document.documentElement.scrollTop || 0; } if (document.body) { x2 = document.body.scrollLeft || 0; y2 = document.body.scrollTop || 0; } var x3 = window.scrollX || 0; var y3 = window.scrollY || 0; // 婊氬姩鏉″埌椤甸潰椤堕儴鐨勬按骞宠窛绂 var x = Math.max(x1, Math.max(x2, x3)); // 婊氬姩鏉″埌椤甸潰椤堕儴鐨勫瀭鐩磋窛绂 var y = Math.max(y1, Math.max(y2, y3)); // 婊氬姩璺濈 = 鐩墠璺濈 / 閫熷害, 鍥犱负璺濈鍘熸潵瓒婂皬, 閫熷害鏄ぇ浜 1 鐨勬暟, 鎵€浠ユ粴鍔ㄨ窛绂讳細瓒婃潵瓒婂皬 var speeding = 1 + acceleration; window.scrollTo(Math.floor(x / speeding), Math.floor(y / speeding)); // 濡傛灉璺濈涓嶄负闆? 缁х画璋冪敤鍑芥暟 if(x > 0 || y > 0) { var run = "gotoTop(" + acceleration + ", " + stime + ")"; window.setTimeout(run, stime); } }; //绐楀彛 $(window).resize(function(){ location=location; });