![]() |
![]() |
![]()
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: Przyjaciele php.pl Postów: 5 724 Pomógł: 259 Dołączył: 13.04.2004 Skąd: N/A Ostrzeżenie: (0%) ![]() ![]() |
Kod <html> <head> <script type="text/javascript"> function disableThem() { document.getElementById( 'submit_0' ).disabled = true; document.getElementById( 'submit_1' ).disabled = true; } function disableThem2() { formularz = document.getElementById( 'Formularz' ); for ( i = 0; i < formularz.length; i++ ) { if ( formularz[ i ].type == 'submit' ) { formularz[ i ].disabled = true; } } } </script> </head> <body onLoad="disableThem2()"> <form name="Formularz" id="Formularz"> <input type="submit" name="Wykonaj[0]" value="Dodaj" id="submit_0"> <input type="submit" name="Wykonaj[0]" value="Usun" id="submit_1"> </form> </body> </html> (EDIT -- usunalem kilka bzdur (IMG:http://forum.php.pl/style_emoticons/default/smile.gif) ) Ten post edytował dr_bonzo 8.02.2005, 19:14:31 |
|
|
![]() ![]() |
![]() |
Aktualny czas: 2.10.2025 - 21:36 |