我有一个简单的 ASP.NET MVC3 索引页面,其中包含超过 11k 项。我有额外的操作链接按钮。代码如下:
<table class="list">
<tr>
<th></th>
<th>
Name
</th>
<th>
Code
</th>
<th>
Explanation
</th>
</tr>
@foreach (var item in Model) {
<tr>
<td>
<a href="@Url.Action("Edit", new { id = item.ID })" class="noUL">
<img class="opr" src="@Url.Content("~/Content/Images/edit.png")" alt="Edit" title="Edit" />
</a>
<a href="@Url.Action("Details", new { id = item.ID })" class="noUL">
<img class="opr" src="@Url.Content("~/Content/Images/info.png")" alt="Details" title="Details"/>
</a>
<a href="@Url.Action("Delete", new { id = item.ID })" class="noUL">
<img class="opr" src="@Url.Content("~/Content/Images/delete.png")" alt="Delete" title="Delete"/>
</a>
</td>
<td width="600px">
@Html.DisplayFor(modelItem => item.Name)
</td>
<td>
@Html.DisplayFor(modelItem => item.Code)
</td>
<td>
@Html.DisplayFor(modelItem => item.Explanation)
</td>
</tr>
}
使用包括 Chrome 和 Firefox 在内的任何其他浏览器打开它都没有问题,但在 IE8 中它首先尝试运行,然后永久锁定。我不期望 IE 有好的表现,但我怎样才能让它发挥作用呢?非常感谢您节省时间的小技巧。例如,我试图为不同大小的列赋予静态宽度。
更新:我删除了图像链接的列并且它起作用了;使用表格甚至更快,而不是我之前尝试过的 div-ul-li 设置。