﻿//库存搜索 切换类型
$(function() {
    $("#seach_btn").click(function() {
        gopage();
    });

    $("#txtStore").keydown(function(e) {
        if (e.keyCode == 13) {
            gopage();
        }
    });
});

function gopage() {
    var num = $.trim($("#txtStore").val().replace("#", ""));
    if (num == "") { return; }
    var kind = $("#seachSelt").val();
    switch (kind) {
        case "1":
            location.href = '/ic/' + num + '.shtml';
            break;
        case "2":
            location.href = '/ic/' + num + '.shtml?stICType=2';
            break;
        case "3":
            location.href = '/RequestShow.shtml?key=' + num;
            break;
        case "4":
            window.open("http://www.alldatasheet.com/view.jsp?Searchword=" + num + "&q=" + num + "");
            break;
    }
}
