function $Len(IdName) { return document.getElementById(IdName).value.length } function $SpaceLen(IdName) { return document.getElementById(IdName).value.replace(/(^\s*)|(\s*$)/g, '') .length } function setTab(name, cursel, n) { for (i = 1; i <= n; i++) { var menu = document.getElementById(name + i) var con = document.getElementById('con_' + name + '_' + i) menu.className = i == cursel ? 'hover' : '' con.style.display = i == cursel ? 'block' : 'none' } } function setTab1(name, cursel, n) { for (i = 1; i <= n; i++) { var menu = document.getElementById(name + i) var con = document.getElementById('con_' + name + '_' + i) var con_a = document.getElementById(name + i + '_a') menu.className = i == cursel ? 'hover' : '' con.style.display = i == cursel ? 'block' : 'none' con_a.style.display = 'none' } var con_a1 = document.getElementById(name + cursel + '_a') con_a1.style.display = 'block' } $(function () { if (ismobile()) { // 鎵嬫満绔?鐐瑰嚮浜嬩欢 $('.footer2_1>ul>li').click(function () { if ($(this).find('.select_content').is(':hidden')) { if ($('.footer2_1 ul li.asect').length > 0) { $('.asect .select_content').hide() $('.footer2_1>ul>li').removeClass('asect') } $(this).addClass('asect').find('.select_content').show() } else { $(this).removeClass('asect').find('.select_content').hide() } }) //灞曠ず-鍗曟暟鐨勮瘽锛屾渶鍚庝竴浣嶅崰浣?00% if ($('.footer2_1>ul>li').length % 2 == 1) { $('.footer2_1>ul>li') .eq($('.footer2_1>ul>li').length - 1) .addClass('dh_li') } } else { $('.footer2_1 ul li') .mouseenter(function () { $(this).addClass('asect').find('.select_content').show() }) .mouseleave(function () { $(this).removeClass('asect').find('.select_content').hide() }) } $('.column3ri1_1 li').each(function () { $('.column3ri1_1 li').hover( function () { $(this).find('a').stop().animate({ 'background-position-y': 0, }) }, function () { $(this).find('a').stop().animate({ 'background-position-y': '5px', }) } ) }) $('.lmtit1 a').hover(function () { $('.spyp_main .spyp_con').eq($(this).index()).show().siblings().hide() }) window.onresize = function () { if (ismobile()) { if ($('.footer2_1>ul>li').length % 2 == 1) { $('.footer2_1>ul>li') .eq($('.footer2_1>ul>li').length - 1) .addClass('dh_li') } } else { $('.footer2_1>ul>li') .eq($('.footer2_1>ul>li').length - 1) .removeClass('dh_li') } } }) // 鏄惁鏄Щ鍔ㄧ function ismobile() { let flag = navigator.userAgent.match( /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i ) return flag != null ? 'Y' : null }