Показать сообщение отдельно
  #2 (permalink)  
Старый 05.03.2015, 10:42
Аватар для ksa
ksa ksa вне форума
CacheVar
Отправить личное сообщение для ksa Посмотреть профиль Найти все сообщения от ksa
 
Регистрация: 19.08.2010
Сообщений: 14,123

Сообщение от M@x Посмотреть сообщение
Имеется страница с несколькими селектами id которых family_0_stat_fm, family_1_stat_fm, family_2_stat_fm и т.д.
Скрипт использую такой
var arr = new Array();
arr[0] = document.getElementById("family_0_stat_fm").value;
arr[1] = document.getElementById("family_1_stat_fm").value;
arr[2] = document.getElementById("family_2_stat_fm").value;
/*arr[3] = document.getElementById("family_3_stat_fm").value;
arr[4] = document.getElementById("family_4_stat_fm").value;
arr[5] = document.getElementById("family_5_stat_fm").value;
arr[6] = document.getElementById("family_6_stat_fm").value;
arr[7] = document.getElementById("family_7_stat_fm").value;
arr[8] = document.getElementById("family_8_stat_fm").value;
arr[9] = document.getElementById("family_9_stat_fm").value;
arr[10] = document.getElementById("family_10_stat_fm").value;
arr[11] = document.getElementById("family_11_stat_fm").value;
arr[12] = document.getElementById("family_12_stat_fm").value;
arr[13] = document.getElementById("family_13_stat_fm").value;
arr[14] = document.getElementById("family_14_stat_fm").value;
arr[15] = document.getElementById("family_15_stat_fm").value;
arr[16] = document.getElementById("family_16_stat_fm").value;
arr[17] = document.getElementById("family_17_stat_fm").value;
arr[18] = document.getElementById("family_18_stat_fm").value;
arr[19] = document.getElementById("family_19_stat_fm").value;*/
Это называют "индусский код"...
Ответить с цитированием