springboot怎么把数据传给前端:springboot 如何引入前端 bootstrap?
这种问题网上一搜一大堆,你可以具体找一篇文章试试,遇到问题可以针对相关问题去提问。springboot通过jar包方式引入bootstrap_个人文章 - SegmentFault 思否 这不是查查就
顺晟科技
2022-10-18 13:59:47
171
我需要添加下拉框或列表框来代替在视图中添加的模型的注释。请建议任何其他替代方法,因为我是新来的。
HTML代码:
@model Sampleapplication.Models.samplemodel
<body>
<table id="tabledetails" class="table table-bordered loaded-table">
<thead>
<tr>
<th> <p>Id</p></th>
<th> <p>Name</p></th>
<th> <p>Department</p></th>
</tr>
</thead>
<tbody></tbody>
</table>
</body>
关于Ajax的成功:
success: function (data) {
$.each(data, function (i, item) {
var rows = "<tr>"
+ "<td class='prtoducttd1'>" + item.Id + "</td>"
+ "<td class='prtoducttd2'>" + item.Name + "</td>"
+ "<td class='prtoducttd11'>@Html.ListBoxFor(m => m.sDepartmentList, Model.lstToDepartment, new { Name = "Departmentlst", id = "Departmentlst", @placeholder = "Select Deaprtment" })</td>"
+ "</tr>";
$('#tabledetails tbody').append(rows);
顺晟科技:
05
2022-12
02
2022-12
02
2022-12
29
2022-11
29
2022-11
24
2022-11