weixin_58648225
2021-06-14 13:46
采纳率: 90%
浏览 71

请指点一个js实现的点击折叠与展开div搜索框的问题

  

  目前这样的一个显示, 问题在于"搜索"文字位于div下,而不是table下,请老师指点。

<div class="box box-info">
    <div class="box-header with-border">
        <h3 class="box-title">搜索</h3>
        <a href="/students/draft/index"><button type="button" name="action" value="draft" class="btn btn-xs btn-github draft">我的草稿</button></a>
    </div>

    <form id="search" method="get">
        <table class="table">

            <tr>
                <td class="pull-right"></td>
                <td>
                    搜索:<input type="text" name="name" id="name" value="{{$wish_data}}" class="form-control">
                </td>
            </tr>
            <tr>

               <td class="pull-right">缴费状态:</td>
                <td>
                    <select name="payment_status_id" class="form-control">
                        <option value="">请选择</option>
                        @foreach ($payment_statuses as  $payment_status)
                            <option value="{{$payment_status->id}}" @if ($payment_status_id == $payment_status->id) selected @endif>
                                {{$payment_status->name}}
                            </option>
                        @endforeach
                    </select>
                </td>
                <td class="pull-right">星级:</td>
                <td>
                    <select name="star_lv" class="form-control">
                        <option value="">请选择</option>
                        <option value="1" @if ($star_lv=='1') selected @endif>1星</option>
                        <option value="2" @if ($star_lv=='2') selected @endif>2星</option>
                        <option value="3" @if ($star_lv=='3') selected @endif>3星</option>
                        <option value="4" @if ($star_lv=='4') selected @endif>4星</option>
                        <option value="5" @if ($star_lv=='5') selected @endif>5星</option>
                    </select>
                </td>
                <td class="pull-right">提醒:</td>
                <td>
                    <select name="notification" class="form-control">
                        <option value="">请选择</option>
                        <option value="0" @if ($notification=='0') selected @endif>不需要</option>
                        <option value="1" @if ($notification=='1') selected @endif>需要</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td class="pull-right">项目:</td>
                <td>
                    <select name="project_id" class="form-control">
                        <option value="">请选择</option>
                        @foreach ($projects as  $project)
                            <option value="{{$project->id}}" @if ($project_id == $project->id) selected @endif>
                                {{$project->name}}
                            </option>
                        @endforeach
                    </select>
                </td>
                <td class="pull-right">项目类别:</td>
                <td>
                    <select name="project_type_id" class="form-control">
                        <option value="">请选择</option>
                        @foreach ($project_types as  $project_type)
                            <option value="{{$project_type->id}}" @if ($project_type_id == $project_type->id) selected @endif>
                                {{$project_type->name}}
                            </option>
                        @endforeach
                    </select>
                </td>
                <td class="pull-right">信息录入人:</td>
                <td>
                    <select name="user_id" class="form-control">
                        <option value="">请选择</option>
                        @foreach ($users as  $user)
                            <option value="{{$user->id}}" @if ($user_id == $user->id) selected @endif>
                                {{$user->name}}
                            </option>
                        @endforeach
                    </select>
                </td>




            </tr>
            <tr>
                <td>
                    <button type="submit" class="btn btn-info pull-right">查询</button>
                </td>
                <td>
                    <a href="student_index"><button type="button" class="btn btn-default">清空</button></a>
                </td>
            </tr>
        </table>
    </form>

</div>

 

谢谢~!

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

2条回答 默认 最新

  • CSDN专家-张老师 2021-06-14 13:50
    已采纳

    前端布局问题

    点赞 打赏 评论
  • 有问必答小助手 2021-06-17 14:53

    您好,我是有问必答小助手,您的问题已经有小伙伴解答了,您看下是否解决,可以追评进行沟通哦~

    如果有您比较满意的答案 / 帮您提供解决思路的答案,可以点击【采纳】按钮,给回答的小伙伴一些鼓励哦~~

    ps: 问答会员年卡【8折】购 ,限时加赠IT实体书,即可 享受50次 有问必答服务,了解详情>>>https://t.csdnimg.cn/RW5m

    点赞 打赏 评论

相关推荐 更多相似问题