这是我当前的代码,
$(document).ready(function () {
$(".stripeMe tr").mouseover(function () {
$(this).addClass("over");
}).mouseout(function () {
$(this).removeClass("over");
});
$(".stripeMe tr:even").addClass("alt");
});
<table class="stripeMe" width="100%">
<tr>
<td style="width:85%">Product Name</td>
<td style="width:5%; text-align:right">Price (each)</td>
<td style="width:5%; text-align:center">Quantity</td>
<td style="width:5%"></td>
</tr>
<% foreach (var cart in Model.Carts) { %>
<tr id="row-<%: cart.RecordID %>">
<td>
<%: Html.ActionLink(Model.pr.GetProduct(cart.ProductID).ProductName.Length > 52 ? (string)Model.pr.GetProduct(cart.ProductID).ProductName.Substring(0, 52) + "..." : (string)Model.pr.GetProduct(cart.ProductID).ProductName, "Elaborate", "Product", new { ProductID = cart.ProductID, RecordID = cart.RecordID }, null)%>
</td>
<td style="text-align:right">
<%: (string)String.Format("{0:F}",Model.pr.GetProduct(cart.ProductID).UnitPrice) %>
</td>
<td>
<input type="text" disabled="disabled" style="text-align:center; border-width:0; background-color:transparent" id="column-Quantity-<%: cart.RecordID %>" value="<%: cart.Quantity %>"></input>
</td>
<td>
<%: Ajax.ActionLink("Remove from Cart", "RemoveFromCart", new { RecordID = cart.RecordID }, new AjaxOptions {OnSuccess = "handleUpdate" })%>
</td>
</tr>
<% } %>
<tr>
<td><hr />Total</td>
<td align="right">
<hr />
<span id="cart-total"><%: (string)String.Format("{0:F}",Model.CartTotal) %></span>
</td>
<td align="center">
<hr />
<span id="cart-quantity"><%: Model.CartQuantity %></span>
</td>
<td><hr /> </td>
</tr>
</table>
不管我怎么改,都不行。我正在使用最新版本的 Firefox。
<td style="width:85%">Product Name</td>