【发布时间】:2010-11-01 12:40:21
【问题描述】:
我有 2 个 html TR,我将它们设为 runat="server" 和 visible="false",并且我有一个名为 citiesDropDownList 的下拉列表
$(document).ready(function() {
$('#<%=citiesDropDownList.ClientID %>').change(function() { ValidateCity(); });
});
在更改此下拉列表时,我检查其文本是否等于字符串,我显示 2 tr 如下
function ValidateCity() {
if ($('#<%= citiesDropDownList.ClientID %> :selected').text() == identity_CityOther) {
$('#<%= otherCityTR.ClientID %>').show();
$('#<%= areasTR.ClientID %>').show();
}
var city = $('#<%= citiesDropDownList.ClientID %>').val();
return IsValid((city.length != 0), '#<%= cityDiv.ClientID %>', identity_CityRequired);
}
.show() 根本不起作用,我没有原因.. 有什么能引导我解决问题吗?
仅供参考:我尝试了$('#<%= otherCityTR.ClientID %>').show('slow'); 和$('#<%= otherCityTR.ClientID %>').css('visibility', 'visible');,但它也不起作用...
【问题讨论】:
-
您在执行过程中检查过是否有任何错误?
-
我没有错误......只是没有行动!!