更新时间:2023-02-14 19:57:58
如果不使用jQuery,假设你在foreach循环中像下面的东西是,只是改变了 TR
定义是这样的:
Without using jQuery, assuming you're in a foreach loop like something below, just change the tr
definition to be something like:
@foreach (var user in Model.Users)
{
<tr onclick="location.href = '@(Url.Action("ShowProfile", "Users", new { userId = user.UserId }))'">
//rest of your markup for that table row
</tr>
}