![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 12 Pomógł: 0 Dołączył: 6.02.2005 Ostrzeżenie: (0%) ![]() ![]() |
Jak wyłączyć (disable) w javascript powyższe pole formularza? bo ten kod niestety nie działa |
|
|
![]() |
![]()
Post
#2
|
|
![]() Grupa: Zarejestrowani Postów: 548 Pomógł: 2 Dołączył: 19.07.2003 Ostrzeżenie: (0%) ![]() ![]() |
witam ...
try this: Kod function disableFunnyInput(inputName,flip){ var inputs = document.getElementsByTagName("input"); var i = 0; for (i=0; i< inputs.length; i++){ if (inputs.item(i).name == inputName){ switch(flip){ case 'disable': inputs.item(i).disabled = true; break; case 'enable': inputs.item(i).disabled = false; break; case 'flip': inputs.item(i).disabled = !(inputs.item(i).disabled); break; } } } } uniwersalna funkcjia ... pozdrawiam -------------------- Computer games don't affect kids; I mean if <span style="font-weight: bold;">Pac Man</span> affected us as kids,we would all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music.
|
|
|
![]() ![]() |
![]() |
Wersja Lo-Fi | Aktualny czas: 14.08.2025 - 19:44 |