![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 69 Pomógł: 0 Dołączył: 3.10.2003 Ostrzeżenie: (0%) ![]() ![]() |
Jak zrobić, aby checkbox lub radiobutton blokował, lub ukrywał pole textowe?
Czyli jeśli nie jest wybrany radiobutton () YES, pole Kod <input type="checkbox" name="nazwa" value="cos">
był albo ukryty albo disabled, a po kliknięciu na tym radiobuttonie lub chceckboxie aby stał się aktywny? |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 208 Pomógł: 0 Dołączył: 19.04.2003 Ostrzeżenie: (0%) ![]() ![]() |
[xml:1:7bcd61d2b2]<?xml version="1.0" encoding="iso-8859-2" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" /> <title>php.pl</title> <script type="text/javascript"> <!-- function _show( strValue ) { if ( strValue == 1 ) { document.getElementById( 'textarea' ).style.display = 'block'; } else { document.getElementById( 'textarea' ).innerHTML = ''; document.getElementById( 'textarea' ).style.display = 'none'; } } //--> </script> </head> <body xml:lang="pl"> <form action="" method="post"> Pokaż TEXTAREA: <br /> <input type="radio" name="show" value="1" onclick="_show( this.value );" /> Tak <input type="radio" name="show" value="0" onclick="_show( this.value );" checked="checked" /> Nie <br /> <textarea id="textarea" name="text" style="display: none;"></textarea> </form> </body> </html>[/xml:1:7bcd61d2b2] |
|
|
![]() ![]() |
![]() |
Aktualny czas: 9.10.2025 - 16:33 |