douhan9748 2012-03-30 08:53
浏览 18
已采纳

选择组合框后显示复选框

I need some idea here.. i wanted to make search function using combo box. after user has selected certain value from the combo box...based on selected value checkbox will appears...

example ...

[combo box] -> select 1.user 2.item 3.tag

when user select "user"

checkbox as follow will appears

checkbox- update user checkbox-delete user

and so forth... this to filter more.. and make user easy to find/view what they want from their search...

if you have other idea..instead of using combo box and check box.. please let me know..

thankssssssss :)

  • 写回答

2条回答

  • drll85318 2012-03-30 21:40
    关注

    Give your select list an ID.

    Using jQuery:

    $(document).ready(function(){
      $("#mySelect").change(function(){
        var selectValue = $("#mySelect").val();
        switch(selectValue){
          case "someValue":
            var checkbox = '<input type="checkbox" name="something" value="something" />'
            $("#someDiv").append(checkbox);
            break;
          case "someOtherValue":
            var checkbox = '<input type="checkbox" name="something" value="something" />'
            $("#someDiv").append(checkbox);
            break;
        }
      });
    });
    

    And so on. Hopefully, you get the idea.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 Stata 面板数据模型选择
  • ¥20 idea运行测试代码报错问题
  • ¥15 网络监控:网络故障告警通知
  • ¥15 django项目运行报编码错误
  • ¥15 请问这个是什么意思?
  • ¥15 STM32驱动继电器
  • ¥15 Windows server update services
  • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏
  • ¥15 模糊pid与pid仿真结果几乎一样
  • ¥15 java的GUI的运用