我使用下面的javascript添加\删除一些隐藏的div
取决于用户选择。我看到代码在chrome和firefox中工作正常。但是在IE中虽然显示了隐藏的div,但它仍处于禁用状态。这里的问题是什么
function AddNewFa()
{
var facount = parseInt($('#countfa').val(),9) ;
if( facount < 10)
{
facount = facount+1;
for(i=3;i<10;i++)
{
if( i<facount )
{
$('#fa'+i).slideDown("fast");
$('#fa-select-'+i).removeAttr("disabled");
}
else
{
$('#fa'+i).slideUp("fast");
$('#fa-select-'+i).attr("disabled","disabled");
}
}
$('#countfa').val(facount);
}
CheckButtons()
}
function RemoveNewFa()
{
var facount = parseInt($('#countfa').val(),10) ;
if( facount >3)
{
facount = facount-1;
for(i=3;i<10;i++)
{
if( i<facount )
{
$('#fa'+i).slideDown("fast");
$('#fa-select-'+i).removeAttr("disabled");
}
else
{
$('#fa'+i).slideUp("fast");
$('#fa-select-'+i).attr("disabled","disabled");
}
}
$('#countfa').val(facount);
}
CheckButtons()
}
function CheckButtons() {
var facount = parseInt($('#countfa').val(),9) ;
if( facount >=9 )
{ $('#addfa').attr('disabled','disabled');}
if( facount >=4 )
{ $('#removefa').removeAttr("disabled");}
if( facount <=3 )
{ $('#removefa').attr('disabled','disabled');}
if( facount <=8 )
{ $('#addfa').removeAttr("disabled");}
}
$(document).ready(function() {CheckButtons();});