713贵宾会检测线路


    欢迎来到713贵宾会检测线路科研百科
    看看713贵宾会检测线路为您准备了什么......
    Welcome to Zhengneng research Encyclopedia See what we have for
    Protein Atlas
    UniProt
    微信扫码关注
    Copyright ©2022 - 2023 成都713贵宾会检测线路生物技术有限责任公司
    犀牛云提供企业云服务
    function renderDropDown(data, type) { if (!data || data.length <= 0) { $("#search-ul").hide(); return; } if ($(".nav_right_search").children(".search-ul").length == 0) { $(".nav_right_search").append(''); } var htm = ""; for (var i = 0; i < data.length; i++) { var obj = data[i]; if (!obj.Name) { continue; } htm += '
  • ' + obj.Name + ''; if (type == 0) { htm += '
    ' + obj.Accessories + '
  • '; } else { htm += '
    搜索历史
    '; } } if (type == 1) { htm += '全部删除'; } $("#search-ul").html(htm); if ($(window).width() > 768) { var a = data.length < 10 ? 75 * data.length : 750; $("#search-ul").css({ "height": "" + a + "px", "overflow-y": "scroll" }); } else { var a = data.length < 8 ? 60 * data.length : 480; $("#search-ul").css({ "height": "" + a + "px", "overflow-y": "scroll" }); } $("#search-ul").show(); } function selectDrop(li) { var typeId = li.data("tid"); if (!typeId) { typeId = 1; } $(".t_search_name").attr("data-typeid", typeId); $("#ShoveWebControl_Search12_tbSearch").val(li.find(".search-name").text().replace(/^\s*|\s*$/g, '')); $("#search-ul").hide(); } $(function() { var dataKey = "_find"; $("#search-ul").remove(); $("#ShoveWebControl_Search12_tbSearch").attr("autocomplete", "off"); var keyup = function(key) { AjaxMethod("Product", "GetCmd", { key: key }, function(data) { renderDropDown(data, 0); }); } var keyupTimer = 0; $("#ShoveWebControl_Search12_tbSearch").on("keyup", function(e) { clearTimeout(keyupTimer); var key = $("#ShoveWebControl_Search12_tbSearch").val(); if (!key || key.length < 3) { $("#search-ul").hide(); $("#ShoveWebControl_Search12_tbSearch").trigger("click"); return; } keyupTimer = setTimeout(function() { keyup(key); }, 500); }); $(document).on("click", function(e) { if (e.target.id == "ShoveWebControl_Search12_tbSearch" || e.target.id == "search-ul") { return; } if (e.target.className.indexOf("search-name") >= 0) { selectDrop($(e.target).parent().parent()); return; } else if (e.target.className.indexOf("search-div") >= 0) { selectDrop($(e.target).parent()); return; } else if (e.target.id.indexOf("search-li") >= 0) { selectDrop($(e.target)); return; } $("#search-ul").hide(); }); $("#ShoveWebControl_Search12_tbSearch").removeAttr("onkeyup"); $("#img_ShoveWebControl_Search12").removeAttr("onclick"); $("#ShoveWebControl_Search12_tbSearch").on("keyup", function(e) { var ev = window.event || e; if (ev.keyCode == 13) { $("#img_ShoveWebControl_Search12").trigger("click"); } }); $("#ShoveWebControl_Search12_tbSearch").on("click", function(e) { var key = $("#ShoveWebControl_Search12_tbSearch").val(); if (key) { return; } var log = localStorage.getItem(dataKey); var json = log ? JSON.parse(log) : []; renderDropDown(json.reverse(), 1); }); $("#img_ShoveWebControl_Search12").on("click", function() { var str = $("#ShoveWebControl_Search12_tbSearch").val(); if (!str || str.indexOf('请输入货号或产品名称进行搜索') >= 0) { return; } str = str.replace(/^\s*|\s*$/g, ''); var key = encodeURIComponent(str); var typeid = $(".t_search_name").attr("data-typeid"); if (!typeid) { typeid = 1; } var url = "/products.aspx?"; var fid = "t3:" + typeid + ":3"; var x = ""; if (typeid > 0) { x = url + "FId=" + fid + "&TypeId=" + typeid + "&key=" + key; } else { x = url + "FId=" + fid + "&TypeId=" + typeid + "&key=" + key; } //记录搜索历史 var log = localStorage.getItem(dataKey); var json = log ? JSON.parse(log) : []; for (var index = 0; index < json.length; index++) { if (json[index].Name == str) { json.splice(index, 1); break; } } if (json.length > 20) { json.splice(0, 1); } json.push({ Name: str, TypeId: typeid }); localStorage.setItem(dataKey, JSON.stringify(json)); window.locations.href = x; }); $(document).on("click", ".clearHis", function() { localStorage.setItem(dataKey, JSON.stringify([])); }); });

    XML地图