這篇文章將為大家詳細(xì)講解有關(guān)el表達(dá)式如何寫入bootstrap表格數(shù)據(jù)頁(yè)面,小編覺(jué)得挺實(shí)用的,因此分享給大家做個(gè)參考,希望大家閱讀完這篇文章后可以有所收獲。
成都創(chuàng)新互聯(lián)公司專業(yè)為企業(yè)提供古城網(wǎng)站建設(shè)、古城做網(wǎng)站、古城網(wǎng)站設(shè)計(jì)、古城網(wǎng)站制作等企業(yè)網(wǎng)站建設(shè)、網(wǎng)頁(yè)設(shè)計(jì)與制作、古城企業(yè)網(wǎng)站模板建站服務(wù),10多年古城做網(wǎng)站經(jīng)驗(yàn),不只是建網(wǎng)站,更提供有價(jià)值的思路和整體網(wǎng)絡(luò)服務(wù)。
el表達(dá)式,寫入bootstrap表格,簡(jiǎn)化代碼,效果圖:
不多說(shuō),上干貨:
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> <c:set var="ctx" value="${pageContext.request.contextPath}"/> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>知識(shí)庫(kù)</title> <link rel="stylesheet" href="<%=basePath %>knowledge-bs/css/bootstrap.min.css"> <link rel="stylesheet" href="<%=basePath %>knowledge-bs/css/bootstrap-table.min.css"> <link href="<%=basePath %>knowledge-bs/css/toastr.css" rel="stylesheet" /> <link href="<%=basePath %>knowledge-bs/css/sweetalert.css" rel="stylesheet" /> <script src="<%=basePath %>knowledge-bs/js/jquery.min.js"></script> <script src="<%=basePath %>knowledge-bs/js/sweetalert.min.js"></script> <script src="<%=basePath %>knowledge-bs/js/bootstrap.min.js"></script> <script src="<%=basePath %>knowledge-bs/js/tableExport.js"></script> <script src="<%=basePath %>knowledge-bs/js/jquery.base64.js"></script> <script src="<%=basePath %>knowledge-bs/js/bootstrap-table.js"></script> <script src="<%=basePath %>knowledge-bs/js/bootstrap-table-export.js"></script> <script src="<%=basePath %>knowledge-bs/js/toastr.js"></script> <style type="text/css"> #reportTableDiv td{height: 50px; text-align: center; line-height: 50px; width: auto;} #reportTableDiv th{height: 50px; text-align: center; line-height: 50px; width: auto;} </style> </head> <body> <jsp:include page="zsfktck.jsp"></jsp:include> <center> <div id="container" > <ul id="myTab" class="nav nav-tabs"> <li><a href="/receiverShow/knowledge-bs/knowledge.html#container">知識(shí)庫(kù)管理</a></li> <li><a href="/receiverShow/findKnowRevi_el.action#container">知識(shí)庫(kù)審核</a></li> <li><a href="/receiverShow/findAskManagement_el.action#container1">提問(wèn)管理</a></li> </ul> <div > <table> <thead> <tr> <td ><label>關(guān)鍵字</label></td> <td ><input type="text" class="form-control" aria-describedby="sizing-addon2" id="keyword" value="" placeholder="請(qǐng)輸入關(guān)鍵字"/></td> <td ><label>標(biāo)題</label></td> <td ><input type="text" class="form-control" aria-describedby="sizing-addon2" id="title" value="" placeholder="請(qǐng)輸入標(biāo)題"/></td> <td ><label>內(nèi)容</label></td> <td ><input type="text" class="form-control" aria-describedby="sizing-addon2" id="content" value="" placeholder="請(qǐng)輸入內(nèi)容"/></td> </tr> </thead> </table> <div > <button id="serch" class="btn btn-info">查詢</button> <button id="reset" class="btn btn-primy">重置</button> </div> </div> <div id="reportTableDiv" class="span10"> <table class="table table-hover" id="tablepos"> <thead> <tr> <th>標(biāo)題</th> <th>分類</th> <th>關(guān)鍵字</th> <th>點(diǎn)擊數(shù)</th> <th>提交時(shí)間</th> <th>詳情</th> <th>操作</th> </tr> </thead> <tbody> <c:forEach var="list" items="${protectLists}"> <tr> <td>${list.title }</td> <td>${list.classification }</td> <td>${list.keyword }</td> <td>${list.clicks}</td> <td>${list.committime}</td> <td><a data-toggle="modal" data-target="#myModal" class="details_button" name="${list.title },${list.clicks},${list.committime},${list.contentss}">詳情</a> </td> <td><a data-toggle="modal" data-target="#myModal" class="review_button" name="${list.title },${list.clicks},${list.committime},${list.contentss},${list.id },">審核</a> </td> </tr> </c:forEach> </tbody> </table> </div> </div> </center> </body> <script type="text/javascript"> $('#serch').click(function () { $.ajax({ type: "POST", url: "findKnowRevi_el.action", success: function (data,msg) { if(msg == "success"){ window.location.href="<%=basePath %>findKnowRevi_el.action?"+"workOrderTDTO1.keyword=" + escape($('#keyword').val()) + "&workOrderTDTO1.title=" + escape($('#title').val())+ "&workOrderTDTO1.content=" + escape($('#content').val()); } }, error: function (XMLHttpRequest, textStatus, thrownError) { alert('模塊加載異常!'); } }); }); $('#reset').click(function(){ $('#keyword').val(""); $('#title').val(""); $('#content').val(""); }); $(".review_button").click(function(){ var id ; $("#myModalLabel_content").text("知識(shí)反饋"); var str=$(this).attr("name"); strs=str.split(","); //字符分割 for (i=0;i<strs.length ;i++ ){ $("#txt_title_details").val(strs[0]); $("#txt_clicks_details").val(strs[1]); $("#txt_committime_details").val(strs[2]); $("#txt_content_details_sub").val(strs[3]); id =strs[4]; }; $('#myModal_content').modal(); $("#button_sub").removeClass("hidden"); $("#button_sub").addClass("modal-footer"); $("#btn_submit_content").click(function(){ $.ajax({ type: "POST", url: "agreeExamine.action", data: "knowledge.id=" +id, success: function (data,msg) { if(msg == "success"){ $('#myModal_content').modal('hide'); window.location.href="<%=basePath %>findKnowRevi_el.action"; toastr.success('審核成功'); } }, error: function (XMLHttpRequest, textStatus, thrownError) { alert('模塊加載異常!'); } }); }); $("#btn_refuse").click(function(){ $.ajax({ type: "POST", url: "deleteKnowExamine.action", data: "id=" +id, success: function (data,msg) { if(msg == "success"){ $('#myModal_content').modal('hide'); window.location.href="<%=basePath %>findKnowRevi_el.action"; toastr.success('拒絕通過(guò)'); } }, error: function (XMLHttpRequest, textStatus, thrownError) { alert('模塊加載異常!'); } }); }); }); $(".details_button").click(function(){ var str=$(this).attr("name"); strs=str.split(","); //字符分割 for (i=0;i<strs.length ;i++ ){ $("#txt_title_details").val(strs[0]); $("#txt_clicks_details").val(strs[1]); $("#txt_committime_details").val(strs[2]); $("#txt_content_details_sub").val(strs[3]); }; $("#myModalLabel_content").text(""); $('#myModal_content').modal(); $("#button_sub").addClass("hidden"); }); </script> </html>
關(guān)于“el表達(dá)式如何寫入bootstrap表格數(shù)據(jù)頁(yè)面”這篇文章就分享到這里了,希望以上內(nèi)容可以對(duì)大家有一定的幫助,使各位可以學(xué)到更多知識(shí),如果覺(jué)得文章不錯(cuò),請(qǐng)把它分享出去讓更多的人看到。
當(dāng)前文章:el表達(dá)式如何寫入bootstrap表格數(shù)據(jù)頁(yè)面
網(wǎng)站URL:http://m.rwnh.cn/article36/ipjcsg.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供小程序開發(fā)、App開發(fā)、網(wǎng)站建設(shè)、電子商務(wù)、ChatGPT、網(wǎng)站設(shè)計(jì)公司
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)