开发者

Hide/Show Values Inside TD tags

开发者 https://www.devze.com 2023-01-07 08:16 出处:网络
How can I hide or show the value containe开发者_如何学God inside a TD tag? E.g: <td id=\"dateCell<%= i %>\">

How can I hide or show the value containe开发者_如何学God inside a TD tag?

E.g:

<td id="dateCell<%= i %>">
<%= Html.Encode(row.ActionOn.HasValue ? Html.FormatDateTime(row.ActionOn.Value) : Html.Encode("")) %>
</td>

How can I get the encoded value and hide or show it depending on a condition?


$('#myDropDown').change(function() {
if($(this).val() == 4) {
    $('#dateCell').hide();
} else if($(this).val() == 3) {
    $('#dateCell').show();
}

});

although this will hide the entire td, which isn't necessarily a good practice

0

精彩评论

暂无评论...
验证码 换一张
取 消