chengkun
2025-04-18 1bb985f32f2efe0f9dd69f3cf29a1c809b1cf96d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
$(document).ready(function(){
    $(".search_add").hover(function(){
        var aid=$(this).attr("type");
        $("#list"+aid).show();
    },function(){
        var aid=$(this).attr("type");
        $("#list"+aid).hide();
    })   
    $(".service_items").hover(function(){
        $(this).addClass("service_items_hover");
    },function(){
        $(this).removeClass("service_items_hover");
    }) 
})
function check_show_search(id){
    if(id==2){
        $("#searchtype1").show();
        $("#searchtype2").hide();
    }else{
        $("#searchtype1").hide();
        $("#searchtype2").show();
    }
}
function checkfrom(myform){
    var keyword=myform.keyword.value; 
    if(keyword=="请输入你要查找的信息"){
        myform.keyword.value='';
    }
}
 
    $(function(){
        //关键字输入框内容与提示信息相同时,当输入框获取焦点则置空该输入框
        $('.search_keyword').delegate('input[name=keyword]','focus',function(){
            if($.trim($(this).val())==$(this).attr('placeholder')){
                $(this).val('');
            }
        });
        //切换 简洁搜索<==>高级搜索
        $('.hunter_search').delegate('.search_more_bth,.search_more_bth_up', 'click', function () {
            if($("#formSimpleSearch").is(":hidden")){
                $('#formAdvanceSearch').hide();
                $('#formSimpleSearch').show();
            }else{
                $('#formSimpleSearch').hide();
                $('#formAdvanceSearch').show();
            }
        });
        //光标悬停时,显示知名企业关注信息
        $('.company_items').delegate('.company_logo','mouseover',function(){
            $(this).find('.company_focus').show();
        });
        //光标离开时,隐藏知名企业关注信息
        $('.company_items').delegate('.company_logo','mouseout',function(){
            $(this).find('.company_focus').hide();
        });
        //单击页面其他区域时,隐藏选择下拉框
        $(document.body).click(function(evt){
            var e = evt || event || window.event;
            var ClickedElement=e.target;
            if(!($(ClickedElement).hasClass('search_add')||$(ClickedElement).parent().hasClass('search_add')||$(ClickedElement).parent().parent().hasClass('search_add')||$(ClickedElement).parent().parent().parent().hasClass('search_add'))){
                $('.search_more .search_select_list').hide();
            } 
        });
        //单击选择按钮,显示选择下拉框
        $('#cityin_name,#hy_name,#mun_name,#pr_name,#uptime_name').click(function () {            
            $('.search_more .search_select_list').hide();
            var SelectedList=$(this).parent().find('.search_select_list');
            if(SelectedList.length>0){
                if(SelectedList.is(":hidden")){
                    SelectedList.show();
                }else{
                    SelectedList.hide();
                }
            }
        });
        //单击选择下拉框指定项,隐藏选择下拉框,并设置选择项
        $('.search_more').delegate('.search_select_list li','click',function(){
            $(this).parent().hide();
            $(this).parent().prev().val($(this).attr('code'));
            $(this).parent().prev().prev().val($(this).attr('codename'));
        });
    });