0

我正在使用下面的 javascript 添加\删除一些隐藏div取决于用户选择。我看到代码在 chrome 和 firefox 中运行良好。但是在 IE 中,即使显示隐藏的 div,它仍然处于禁用状态。这里有什么问题

PHP 小提琴设置

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();});
4

0 回答 0