From ceb20b9eef9814aa082870d926f2867b28657dda Mon Sep 17 00:00:00 2001 From: liudan <18634735655@163.com> Date: Tue, 3 Jan 2023 16:42:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 2 +- js/index.js | 20 ++++++++++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index db646c6..597441a 100644 --- a/index.html +++ b/index.html @@ -451,7 +451,7 @@ - + diff --git a/js/index.js b/js/index.js index 81d96c0..6991c45 100644 --- a/js/index.js +++ b/js/index.js @@ -83,6 +83,7 @@ $(function(){ } ] }); + $('.electricItem').mouseenter(function(){ $(this).addClass('section3active').parent().siblings().children().removeClass('section3active') if($(this).children()[1].innerText=='先进材料'){ @@ -392,14 +393,29 @@ $(function(){ }) $('.select').append(html) $('.select').change(function(){ + + // let oWindow = window.open('', '_blank'); if($(this).val()){ - // window.open($(this).val()); - window.location.href = $(this).val() + var u = navigator.userAgent; + var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端 + var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端 + if(isiOS){ + window.location.href = $(this).val() + }else{ + window.open($(this).val()); + } + if(/android/i.test(navigator.userAgent)){ + } + if(/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)){ + }else{ + + } } }) } }) }) + function news01_render(categoryId){ $.ajax({ type: 'post',