Javascript Knowledge

  • what is javascript

  • javascript Variable
  • javascript function
  • javascript Event

  • JavaScript If
  • javascript for

  • javascript object
  • Javascript String
  • Javascript Date
  • Javacsript Array
  • Javascript Math

  • Javascript onclick
  • JavaScript onload

  • Javascript Frame
  • Javascript Image
  • Javascript Style
  • Javascript Textarea
  • Javascript Table
  • Javascript window
  • Javascript Location
  • Javacsript form
  • Javascript Checkbox
  • Javascript Input
  • Javascript Radio
  • Javascript Select
  • Javascript Submit

  • Javascript alert
  • Javascript close
  • Javascript confirm
  • Javascript Document open
  • Javascript getElementById
  • Javascript print
  • Javascript reload
  • Javascript remove
  • JavaScript replace
  • Javascript setTimeout
  • JavaScript split
  • JavaScript substring
  • Javascript window open
  • window showmodaldialog

  • Javascript href
  • Javascript IFrame
  • Javascript innerHTML
  • Javascript selectedindex
  • Javascript URL
  • Javascript window Location

  • javascript write to file
  • JavaScript write
  • javascript string to integer
  • Javascript popup
  • Javascript return
  • Javascript Obfuscator
  • Javascript disable
  • Javascript Hide
  • More others

    Javascript
    CSS
    PHP

     

    Javascript Radio


    Javascript Radio Object

    The Radio object represents a radio button in an HTML form. For each instance of an <input type="radio"> tag in an HTML form, a Radio object is created.

    You can access a Radio object by indexing the elements array (by number or name) of the corresponding form or by using getElementById().

    IE: Internet Explorer, F: Firefox, N: Netscape, W3C: World Wide Web Consortium (Internet Standard).

    Javascript Radio Object Properties

    Property

    Description

    IE 

    F

    N

    W3C

    accept

    Sets or returns a list of content types, which the server processing this form will handle correctly

    -

     

     

    Yes

    accesskey

    Sets or returns the keyboard key to access the radio button

    4

     

     

    Yes

    align

    Sets or returns the alignment of the radio button according to the surrounding text

    -

     

     

    Yes

    alt

    Sets or returns an alternate text to display if the browser does not support radio buttons

    -

     

     

    Yes

    checked

    Sets or returns the current state of the radio button (true if selected and false if not selected)

    3

    1

    2

    Yes

    defaultChecked

    Sets or returns the default value of the checked attribute (true if checked by default and false if not)

    3

    1

    2

    Yes

    disabled

    Sets or returns whether or not the radio button should be disabled

    5

    1

     

    Yes

    form

    Returns a reference to the radio button's parent form

    3

    1

    2

    Yes

    id

    Sets or returns the id of the radio button (In IE 4 this property is read-only)

    4

    1

     

    No

    name

    Sets or returns the name of the radio button

    3

    1

    2

    Yes

    size

    Sets or returns the size of the radio button

    3

     

     

    Yes

    tabIndex

    Sets or returns the tab order for the radio button

    4

     

     

    Yes

    type

    The type of the form element. For a radio object it will always be "radio"

    3

    1

    3

    Yes

    value

    Sets or returns the value of the value attribute of the radio button

    3

    1

    2

    Yes

    Radio Object Methods

    Method

    Description

    IE

    F

    N

    W3C

    blur()

    Removes focus from the radio button

    4

    1

    2

    Yes

    click()

    Simulates a mouse-click on the radio button

    4

    1

     

    Yes

    focus()

    Sets focus on the radio button

    3

    1

    2

    Yes

    select()

    Selects the radio button

    4

    1

    2

    No

    Radio Object Events

    Syntax: object.event_name="someJavaScriptCode"

    Event

    Description

    IE

    F

    N

    W3C

    onBlur

    Executes some code when the radio button loses focus

    4

    1

    2

     

    onClick

    Executes some code when the user clicks on the radio button

    4

     

     

     

    onFocus

    Executes some code when the radio button gets focus

    3

    1

    2

     

    onSelectStart

    Executes some code when the radio button is selected

    4

     

     

     

     

     





















     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

  • Javascript |