首页 新闻 会员 周边 捐助

easyui combobox 下拉框里面怎么放按钮

0
悬赏园豆:10 [已解决问题] 解决于 2014-08-20 12:26

比如这样的结构,怎么放一个按钮进去呢?

<select id="cc" class="easyui-combobox" name="dept" style="width:200px;">
<option value="aa">aitem1</option>
<option>bitem2</option>
<option>bitem3</option>
<option>ditem4</option>
<option>eitem5</option>
</select>

骑着蜗牛耍流氓的主页 骑着蜗牛耍流氓 | 初学一级 | 园豆:135
提问于:2014-08-20 11:38
< >
分享
最佳答案
0
    <html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Combo - jQuery EasyUI Demo</title>
        <link rel="stylesheet" type="text/css" href="../themes/default/easyui.css">
        <link rel="stylesheet" type="text/css" href="../themes/icon.css">
         <link rel="stylesheet" type="text/css" href="demo.css">
         <script type="text/javascript" src="../jquery-1.7.2.min.js"></script>
         <script type="text/javascript" src="../jquery.easyui.min.js"></script>
    <script>
        $(function(){
            $('#cc').combo({
                required:true,
                editable:false
            });
            $('#sp').appendTo($('#cc').combo('panel'));
            $('#sp input').click(function(){
                var v = $(this).val();
                var s = $(this).next('span').text();
                $('#cc').combo('setValue', v).combo('setText', s).combo('hidePanel');
            });
        });
    </script>
</head>
<body>
    <h2>下拉选择框 - Custom Combo</h2>
    <div class="demo-info" style="margin-bottom:10px">
        <div class="demo-tip icon-tip"></div>
        <div>单击右箭头按钮来显示下拉面板,可以是任何内容。</div>
    </div>
        <select id="cc"></select>
    <div id="sp">
        <div style="color:#99BBE8;background:#fafafa;padding:5px;">选择编程语言</div>
        <input type="radio" name="lang" value="01"><span>Java</span><br/>
        <input type="radio" name="lang" value="02"><span>C#</span><br/>
        <input type="radio" name="lang" value="03"><span>Ruby</span><br/>
        <input type="radio" name="lang" value="04"><span>Basic</span><br/>
        <input type="radio" name="lang" value="05"><span>Fortran</span>
    </div>
</body>
</html>

里面input 的type 属性设置为你需要的

收获园豆:10
亦有哭亦有笑 | 初学一级 |园豆:5 | 2014-08-20 12:10

OK

骑着蜗牛耍流氓 | 园豆:135 (初学一级) | 2014-08-20 12:17
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册