خرید بک لینک
I have 3 selects, ExpiryMonth,ExpiryDay and ExpiryYear combining make ExpiryDate. Select the month from 1-12 and the day select populates with the days of the month, depending on the month. That's working. Before adding the options I want to remove all except the first, option 0 (selected).
Code:

var expiryDays = document.getElementById("ExpiryDay");
if(document.Form.ExpiryDay.length > 1)//already populated with options
{
for(var x=1;x<expiryDays.length-1;x++)
{
expiryDays.remove(x);
}
}

This removes only the odd numbered options, 1,3,5 etc. No idea why.

برچسب: نویسنده: آیلین رضوانی تاريخ: شنبه 23 دی 1396 ساعت: 22:36

صفحه بندی