// 鍔ㄧ敾鏁堟灉 new WOW().init(); IEVersion(); // 鍒ゆ柇IE function IEVersion() { var userAgent = navigator.userAgent; //鍙栧緱娴忚鍣ㄧ殑userAgent瀛楃涓 var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1; //鍒ゆ柇鏄惁IE<11娴忚鍣 var isEdge = userAgent.indexOf("Edge") > -1 && !isIE; //鍒ゆ柇鏄惁IE鐨凟dge娴忚鍣 var isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf("rv:11.0") > -1; // document.body.style.opacity = 0; document.body.style.display = 'none'; if (isIE) { var reIE = new RegExp("MSIE (\\d+\\.\\d+);"); reIE.test(userAgent); var fIEVersion = parseFloat(RegExp["$1"]); console.log(fIEVersion) if (fIEVersion == 7) { $("html").addClass("browsers"); } else if (fIEVersion == 8) { $("html").addClass("browsers"); } else if (fIEVersion == 9) { $("html").addClass("browsers"); } else if (fIEVersion == 10) { $("html").addClass("browsers"); return 10; } else { $("html").addClass("browsers"); } } else if (isEdge) { // document.body.style.opacity = 1; document.body.style.display = "block"; return 'edge'; //edge } else if (isIE11) { // document.body.style.opacity = 1; document.body.style.display = "block"; return 11; //IE11 } else { // document.body.style.opacity = 1; document.body.style.display = "block"; return -1; //涓嶆槸ie娴忚鍣 } } // 涓€涓弬鏁 function ajax(url, id) { var ajax = $.ajax({ url: url, async: false, data: { id: id } }); $("#list-ajax").html(ajax.responseText); }; // 甯︽悳绱 function ajaxVal(url, id, val) { var ajax = $.ajax({ url: url, async: false, data: { id: id, val: val } }); $('.ajax-search input').val(''); $("#list-ajax").html(ajax.responseText); }; function ajaxDoubVal(url, id, id2, val) { var ajax = $.ajax({ url: url, async: false, data: { id: id, id2: id2, val: val } }); $('.ajax-search input').val(''); $("#list-ajax").html(ajax.responseText); }; // 鍒嗛〉 function page(url, sum) { p += 1; var ajax = $.ajax({ url: NewUrl, data: { page: p }, cache: false, dataType: 'html', beforeSend: function() {}, success: function(html) { $("#page-box").append(html); } }); if (p == sum - 1) { $(".page-btn").hide(); } return false; }; // 涓€涓弬鏁扮殑鎼滅储 function pageTab(url, id, sum) { $("#page-box").fadeIn(3000); p += 1; var ajax = $.ajax({ url: NewUrl, data: { page: p, id: id }, cache: false, dataType: 'html', beforeSend: function() {}, success: function(html) { $("#page-box").append(html); } }); if (p == sum - 1) { $(".page-btn").hide(); } return false; }; // 婊氬姩鏁堟灉 function scroll(num) { $('html,body').stop().animate({scrollTop:$('#list-box').offset().top - num},800); } function scrollA(num) { $('html,body').animate({ scrollTop: ($($(this).attr('href')).offset().top - num) }, 1000) }