Sunday, 26 June 2011

Clear DropDownList Items Through JavaScript


function ClearDDL(objDDL)
{
    if(objDDL && (objDDL.options.length > 0))
    {   
        for(var i=objDDL.options.length-1; i>=0; i--)
        {
            objDDL.remove(i);
        }
    }  
}

No comments:

Post a Comment