【发布时间】:2021-04-10 15:41:42
【问题描述】:
我可以通过表格显示消息。 我可以使用 textarea 吗?我不知道该使用哪些控件。 我是 MVC 的新手,任何帮助将不胜感激。
<table class="table-responsive">
<tr>
<td id="output"></td>
</tr>
</table>
这是我的脚本:
function sendName(id) {
$.ajax({
datatype: "json",
type: "POST",
data: { 'senderName': id },
url: '/Inbox/GetInboxes/',
success: function (result)
{
debugger;
let output = result.map(i => "<tr><td>" + i.FromID + "/" + i.Body + "/" + i.DateSent);
$("#output").html(output);
},
error: function (status, exception)
{
//alert('Exception:', exception);
}
});
}
【问题讨论】:
-
谢谢@BS
标签: c# jquery asp.net model-view-controller