Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [php] checked="checked"
motorider
post
Post #1





Grupa: Zarejestrowani
Postów: 25
Pomógł: 0
Dołączył: 15.11.2008

Ostrzeżenie: (0%)
-----


Posiadam pola typu radio w formularzu, jak zrobić aby po przeładowaniu strony zostały wyświetlone wcześniej zaznaczone opcje? Wiem, że należy skorzystać z atrybutu checked="checked"
CODE

<input type="radio" name="status_1" value="tak"/>tak
<input type="radio" name="status_1" value="nie"/>nie
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
kayy
post
Post #2





Grupa: Zarejestrowani
Postów: 112
Pomógł: 1
Dołączył: 3.08.2008

Ostrzeżenie: (0%)
-----


Jak już to checked = "TRUE", ale w wiekszosci przegladarkach poprostu samo sie cofa (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)
Go to the top of the page
+Quote Post
mike
post
Post #3





Grupa: Przyjaciele php.pl
Postów: 7 494
Pomógł: 302
Dołączył: 31.03.2004

Ostrzeżenie: (0%)
-----


Cytat(kayy @ 4.12.2008, 19:20:33 ) *
Jak już to checked = "TRUE", ale w wiekszosci przegladarkach poprostu samo sie cofa (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)
Doczytaj sobie, bo błądzisz we mgle (IMG:http://forum.php.pl/style_emoticons/default/tongue.gif)
W3C :: INPUT Tag
Kod
<!ENTITY % InputType
  "(TEXT | PASSWORD | CHECKBOX |
    RADIO | SUBMIT | RESET |
    FILE | HIDDEN | IMAGE | BUTTON)"
   >

<!-- attribute name required for all but submit and reset -->
<!ELEMENT INPUT - O EMPTY              -- form control -->
<!ATTLIST INPUT
  %attrs;                              -- %coreattrs, %i18n, %events --
  type        %InputType;    TEXT      -- what kind of widget is needed --
  name        CDATA          #IMPLIED  -- submit as part of form --
  value       CDATA          #IMPLIED  -- Specify for radio buttons and checkboxes --
  checked     (checked)      #IMPLIED  -- for radio buttons and check boxes --
  disabled    (disabled)     #IMPLIED  -- unavailable in this context --
  readonly    (readonly)     #IMPLIED  -- for text and passwd --
  size        CDATA          #IMPLIED  -- specific to each type of field --
  maxlength   NUMBER         #IMPLIED  -- max chars for text fields --
  src         %URI;          #IMPLIED  -- for fields with images --
  alt         CDATA          #IMPLIED  -- short description --
  usemap      %URI;          #IMPLIED  -- use client-side image map --
  ismap       (ismap)        #IMPLIED  -- use server-side image map --
  tabindex    NUMBER         #IMPLIED  -- position in tabbing order --
  accesskey   %Character;    #IMPLIED  -- accessibility key character --
  onfocus     %Script;       #IMPLIED  -- the element got the focus --
  onblur      %Script;       #IMPLIED  -- the element lost the focus --
  onselect    %Script;       #IMPLIED  -- some text was selected --
  onchange    %Script;       #IMPLIED  -- the element value was changed --
  accept      %ContentTypes; #IMPLIED  -- list of MIME types for file upload --
  >

Jak widzisz atrybut checked przyjmuje wartość checked lub wcale.
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 15.10.2025 - 09:02