- 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
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
<script type="text/javascript">
function Show(a) {
obj1=document.getElementById("mydiv1");
obj2=document.getElementById("mydiv2");
obj3=document.getElementById("mydiv3");
obj4=document.getElementById("mydiv4");
obj5=document.getElementById("mydiv5");
uslugia=document.getElementById("uslugi");
uslugib=document.getElementById("uslugi1");
if (a == 1 || a == 2 || a == 3 || a == 4) {obj1.style.display="block"; uslugia.style.display="block"; infa.style.display="block";
obj5.style.display="none"; uslugib.style.display="none";
}
if (a == 5) {obj5.style.display="block"; infa.style.display="block";
obj1.style.display="none"; uslugia.style.display="none";
}
calc ();
}
function ShowServices(a) {
if (a == 'premium') {
console.log ("a")
us1.checked = us2.checked = us3.checked = us4.checked = us5.checked = false
us1.disabled = us2.disabled = us3.disabled = us4.disabled = us5.disabled = true;
} else {
console.log ("b")
us1.disabled = us2.disabled = us3.disabled = us4.disabled = us5.disabled = false;
}
if (a == 'premium5') {
uslugi1.style.display="block"
} else {
uslugi1.style.display="none"
}
if (a == 'min' || a == 'stan' || a == 'premium' || a == 'min5' || a == 'stan5' || a == 'premium') {
infa.style.display="none";
}
calc ();
}
function ShowUs(a) {
{calc();};
}
function ShowV (a) {
if (a == 1 || a == 2 || a == 3 || a == 4) {
min5.checked = stan5.checked = prem5.checked = false;
}
if (a == 5) {
min1.checked = stan1.checked = prem1.checked = false;
}
}
function calc() {
var d = document, usl1 = usl2 = usl3 = usl4 = usl5 = ull1 = ull2 = 0;
var
min1 = d.getElementById("min1"),
stan1 = d.getElementById("stan1"),
prem1 = d.getElementById("prem1"),
min5 = d.getElementById("min5"),
stan5 = d.getElementById("stan5"),
prem5 = d.getElementById("prem5"),
us1 = d.getElementById("us1"),
us2 = d.getElementById("us2"),
us3 = d.getElementById("us3"),
us4 = d.getElementById("us4"),
us5 = d.getElementById("us5"),
result = d.getElementById("result");
console.log ('c');
if (us1.checked) usl1 = +us1.value;
if (us2.checked) usl2 = +us2.value;
if (us3.checked) usl3 = +us3.value;
if (us4.checked) usl4 = +us4.value;
if (us5.checked) usl5 = +us5.value;
if (min1.checked) cina = +min1.value;
if (stan1.checked) cina = +stan1.value;
if (prem1.checked) cina = +prem1.value;
if (min5.checked) cina = +min5.value;
if (stan5.checked) cina = +stan5.value;
if (prem5.checked) cina = +prem5.value;
if (ul1.checked) ull1 = +ul1.value;
if (ul2.checked) ull2 = +ul2.value;
result.innerHTML = Math.ceil(cina + usl1 + usl2 + usl3 + usl4 + usl5 + ull1 +ull2);
};
document.body.onload = function() {
console.log ('d');
calc ();
}
</script>
Пишу сайт, опыт программирования нулевой, но 2 сайта уже сделал...
Решил показать свой код, так как точно чувствую что он подходит для этого сайта =)
Lokich 14.05.2015 23:07 # +1
Fike 15.05.2015 03:34 # 0