点击按钮根据文本框中的内容从数据库中输出数据

 <table id="choose_time">
            <tr>
                <td>请选择时间</td>
                <td><input type="text" id="d11" name="d11" onclick="WdatePicker()" style="margin-left: 60px"></td>
                <td><a class="btn btn-small btn-success" onClick="click();" style="margin-left: 80px">查询</a></td>
            </tr>
   </table>

        <div class="first">
            <table id="table_report" class="table table-striped table-bordered table-hover" style="white-space:nowrap;">
                <thead>
                    <tr>
                        <th width="20px">序号</th>
                        <th width="20px">员工姓名</th>
                        <th>上班时间</th>
                    </tr>
                </thead>

                <tbody> 
                <!-- 开始循环 -->   
                <c:choose>
                    <c:when test="${not empty historyworkList}">
                        <c:if test="${QX.cha == 0}">
                        <c:forEach items="${historyworkList}" var="historywork" varStatus="vs">     
                            <tr>
                                <td class='center' style="width: 30px;">${vs.index+1}</td>
                                <td>${historywork.employee_name}</td>   <%--  员工姓名 --%>
                                <td>${historywork.message_time}</td>   <%-- 员工下班时间 --%>

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

                        <c:if test="${QX.cha == 1 }">
                            <tr>
                                <td colspan="10" class="center">您无权查看</td>
                            </tr>
                        </c:if>
                    </c:when>

                    <c:otherwise>
                        <tr class="main_info">
                            <td colspan="16" class="center">没有相关数据</td>
                        </tr>
                    </c:otherwise>
                </c:choose>
                </tbody>
            </table>
            </div>
 ![图片说明](https://img-ask.csdn.net/upload/201608/14/1471166979_430794.png)

我想在

这么写可以嘛

代码不是完整的 两个独立的部分

查询按钮和文本框放入表单中,点击查询按钮提交表单,服务器端获取内容查询就行了,无刷新就用ajax