- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
var txt_tmp = "";
if (document.getElementById('id_prod_ch0').checked == true) {
if (txt_tmp != '') {
txt_tmp = txt_tmp + ', ';
}
txt_tmp = txt_tmp + document.getElementById('id_prod_ch0').value;
}
if (document.getElementById('id_prod_ch1').checked == true) {
if (txt_tmp != '') {
txt_tmp = txt_tmp + ', ';
}
txt_tmp = txt_tmp + document.getElementById('id_prod_ch1').value;
}
if (document.getElementById('id_prod_ch2').checked == true) {
if (txt_tmp != '') {
txt_tmp = txt_tmp + ', ';
}
txt_tmp = txt_tmp + document.getElementById('id_prod_ch2').value;
}
if (document.getElementById('id_prod_ch3').checked == true) {
if (txt_tmp != '') {
txt_tmp = txt_tmp + ', ';
}
txt_tmp = txt_tmp + document.getElementById('id_prod_ch3').value;
}
if (document.getElementById('id_prod_ch4').checked == true) {
if (txt_tmp != '') {
txt_tmp = txt_tmp + ', ';
}
txt_tmp = txt_tmp + document.getElementById('id_prod_ch4').value;
}
// ... около 100 ифов
document.getElementById("id_param_m").innerHTML=txt_tmp;
Когда не знаешь о join().
Ещё это было написано в одну строку, и это был не минификатор, а похоже ифы в конец дописывали.