最新文章专题视频专题问答1问答10问答100问答1000问答2000关键字专题1关键字专题50关键字专题500关键字专题1500TAG最新视频文章推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37视频文章20视频文章30视频文章40视频文章50视频文章60 视频文章70视频文章80视频文章90视频文章100视频文章120视频文章140 视频2关键字专题关键字专题tag2tag3文章专题文章专题2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章专题3
当前位置: 首页 - 科技 - 知识百科 - 正文

下拉列表框_html/css

来源:动视网 责编:小采 时间:2020-11-27 16:06:35
文档

下拉列表框_html/css

下拉列表框_html/css_WEB-ITnose:武汉市预约献血登记表div ,ul ,li, span, table, h1~h6,{ margin:0px; padding:0px;}input{ background-color:#eeeee;}i{ color:#FF9900;}label{ margin-bottom: 10px;}small{ font-size:13px;
推荐度:
导读下拉列表框_html/css_WEB-ITnose:武汉市预约献血登记表div ,ul ,li, span, table, h1~h6,{ margin:0px; padding:0px;}input{ background-color:#eeeee;}i{ color:#FF9900;}label{ margin-bottom: 10px;}small{ font-size:13px;




武汉市预约献血登记表








  • 武汉市预约献血登记表






  • 预约献血可以对您提供更好的服务,免去您排队等待的时间。
    如遇人数满员情况,我们会与您联系进行调整。
    谢谢您对无偿献血事业的付出!










    function sex(){
    var rs=document.getElementsByName('a');
    for(var i=0; i if(rs[i].check){
    alert(rs[i].value==0?"女":"男");
    break;
    }
    }
    }



    (function($){
    //获取select
    var selects=$('select');
    for(var i=0; i createSelect(selects[i],i);
    }
    function createSelect(select_container, index){
    var tag_select=$('');
    tag_select.attr('class','select_box');
    tag_select.insertBefore(select_container);

    var select_showbox=$('');
    //容易出错appendTo
    select_showbox.css('cursor','pointer').attr('class','select_showbox').appendTo(tag_select);
    //容易出错
    var ul_option=$('')
    ul_option.attr('class','select_option');
    ul_option.appendTo(tag_select);
    createOptions(index,ul_option);


    tag_select.toggle(function(){
    ul_option.show();
    },function(){
    ul_option.hide();
    });

    var li_option=ul_option.find('li');
    li_option.on('click',function(){
    $(this).addClass('selected').siblings().removeClass('selected');
    var value=$(this).text();
    select_showbox.text(value);
    ul_option.hide();
    });

    li_option.hover(function(){
    $(this).addClass('hover').siblings().removeClass('hover');
    },function(){
    li_option.removeClass('hover');
    });

    }
    function createOptions(index,ul_list){
    //获取被选中的元素并将其值赋值到显示框中
    var options=selects.eq(index).find('option'),
    selected_option=options.filter(':selected'),
    selected_index=selected_option.index(),
    showbox=ul_list.prev();
    showbox.text(selected_option.text());

    //为每个option建立个li并赋值
    for(var n=0;n var tag_option=$('

  • '),//li相当于option
    txt_option=options.eq(n).text();
    tag_option.text(txt_option).css('cursor','pointer').appendTo(ul_list);

    //为被选中的元素添加class为selected
    if(n==selected_index){
    tag_option.attr('class','selected');
    }
    }
    }

    })(jQuery)


    文档

    下拉列表框_html/css

    下拉列表框_html/css_WEB-ITnose:武汉市预约献血登记表div ,ul ,li, span, table, h1~h6,{ margin:0px; padding:0px;}input{ background-color:#eeeee;}i{ color:#FF9900;}label{ margin-bottom: 10px;}small{ font-size:13px;
    推荐度:
    标签: it 下拉 html
    • 热门焦点

    最新推荐

    猜你喜欢

    热门推荐

    专题
    Top