我想用选项替换我的div内容我应该怎么做?

时间:2016-01-19 10:47:32

标签: javascript jquery jsp

这是我的div显示我的内容

现在我想用一些不同的数据更改div内容,我的意思是删除一些coloumns并在同一个div中显示相同的数据

任何人都可以帮我做吗?如何用不同的数据替换我的div或崩溃或隐藏旧数据也没关系

<div class="content-wrapper" id="allCampaigns"
            <!-- Content Header (Page header) -->
            <section class="content-header">
                <h1>
                    <i class="fa fa-laptop"> Campaigns</i> 
                    <small>new, modify, convert, delete Campaigns</small>
                </h1>
                <ol class="breadcrumb">
                    <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
                    <li class="active"><a href="#"><i class="fa fa-file-archive-o"></i> Campaigns</a></li>              
                </ol>
            </section>

            <!-- /.Content Header (Page header) -->

            <!-- Main content -->
            <section class="content">
                <!-- row -->
                <div class="row">
                    <!-- col-sm-12 -->
                    <div class="col-sm-12">
                        <!-- box -->
                        <div class="box">


                            <!-- box-body -->
                            <div class="box-body">
                                <!-- mailbox-controls -->
                                <div class="mailbox-controls">




                                    <!-- box-header -->

                            <div class="btn-group">
                            <label class="col-sm-12 control-label">Campaign List</label>
                            <div class="col-sm-12">
                                        <select class="selectpicker form-control" data-live-search-placeholder="Search"
                                                    data-live-search="true" data-actions-box="true" id="getlist">
                                                    <option value="0" selected="selected" disabled>-non-</option>
                                                    <option value="1" >AllCampaigns</option>
                                                    <option value="2" >AllActivecampaigns</option>
                                                    <option value="3" >CampCreatedbyMe</option>
                                                    <option value="4" >MyActivecampaigns</option>
                                                    <option value="5" >MyCampaigns(Assigned To Me)</option>
                                        </select>
                                        </div>
                                    </div> 
                            <!-- /.box-header -->

                                    <!-- pull-right-->
                                    <div class="pull-right">

                                        <button type="button" class="btn btn-default " data-toggle="modal" data-target="#myModalNewCampaign"><i class="fa fa-plus"> New Campaign</i></button>                               
                                        <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"><i class="fa fa-download"> Import  </i> </button>                                 

                                        <!-- /.btn-group -->
                                        <div class="btn-group">
                                            <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Lead Tools <span class="fa fa-caret-down"></span> </button>
                                            <ul class="dropdown-menu">
                                                <li><a href="#">Action</a></li>
                                                <li><a href="#">Another action</a></li>
                                                <li><a href="#">Something else here</a></li>
                                                <li class="divider"></li>
                                                <li><a href="#">Separated link</a></li>
                                            </ul>
                                        </div><!-- /.btn-group -->

                                    </div><!-- /.pull-right -->
                                </div>
                                <!-- mailbox-controls -->

                                 <!-- table-responsive -->   
                                <div class="table-responsive">
                                    <table id="campaignListTable" class="table no-margin table-bordered table-hover " >
                                        <thead>
                                            <tr >
                                                <th>Sl No.</th>
                                                <th>Campaign Name</th>
                                                <th>Type</th>
                                                <th>Status</th>
                                                <th>StartDate</th>
                                                <th>EndDate</th>
                                                <th>Campaign Owner</th>
                                                <th></th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <c:if test="${!empty groupCampaign}" >
                                                <c:forEach items="${groupCampaign}" var="campaignslist" varStatus="status">
                                                    <tr>
                                                        <td>${status.index+1}</td>
                                                        <td>${campaignslist.campaignName}</td>                                          
                                                        <td>${campaignslist.campaignType.typeName}</td>
                                                        <td>${campaignslist.status.statusName}</td>
                                                        <td>${campaignslist.startDate}</td>
                                                        <td>${campaignslist.endDate}</td>
                                                        <td>${campaignslist.campaignOwnerType}</td> 

                                                        <td>
                                                            <a href="#" title="Edit Campaign" data-toggle="modal" data-target="#myModalEditCampaign"

                                                                    onclick="setCampaign('${campaignslist.id}');"><i class="fa fa-edit"></i>
                                                            </a>
                                                            <a href="#" title="Delete Campaign" onclick="deleteCampaign(${campaignslist.id});">

                                                                    <i class="fa fa-trash-o"></i>
                                                            </a>
                                                        </td>

                                                    </tr>   
                                                </c:forEach>
                                            </c:if>
                                       </tbody>                                                                     
                                    </table>

                                  </div>


                                  <!-- /.table-responsive --> 
                            </div>
                            <!-- /.box-body -->

                        </div><!-- /.box -->
                    </div><!-- /.col-sm-12 -->              
                </div><!-- /.row -->

            </section>
            <!-- /.Main content -->        
        </div>

0 个答案:

没有答案