Check a Radio Button : RadioButton Radio « Form Control « JavaScript DHTML

Home
JavaScript DHTML
1.Ajax Layer
2.Data Type
3.Date Time
4.Development
5.Document
6.Dojo toolkit
7.Event
8.Event onMethod
9.Ext JS
10.Form Control
11.GUI Components
12.HTML
13.Javascript Collections
14.Javascript Objects
15.Javascript Properties
16.jQuery
17.Language Basics
18.Mochkit
19.Mootools
20.Node Operation
21.Object Oriented
22.Page Components
23.Rico
24.Scriptaculous
25.Security
26.SmartClient
27.Style Layout
28.Table
29.Utilities
30.Window Browser
31.YUI Library
JavaScript DHTML » Form Control » RadioButton Radio 




Check a Radio Button
  
    
<html>
<body>
<form>
<script>
    function function1() {
        document.all.myRadioButton1.checked = true;
    }
    function function2() {
        document.all.myRadioButton2.checked = true;
    }
    function function3() {
        document.all.myRadioButton3.checked = true;
    }
    function function4() {
        document.all.myRadioButton4.checked = true;
    }
</script>
<input id="myRadioButton1" type="radio" name="radiobutton" value="radiobutton">VISA
<input id="myRadioButton2" type="radio" name="radiobutton" value="radiobutton">MASTERCARD
<input id="myRadioButton3" type="radio" name="radiobutton" value="radiobutton">DISCOVER
<input id="myRadioButton4" type="radio" name="radiobutton" value="radiobutton">AMERICAN EXPRESS
<br>
<input type="button" value="VISA checked" onClick="function1();">
<input type="button" value="MASTERCARD checked" onClick="function2();">
<input type="button" value="DISCOVER checked" onClick="function3();">
<input type="button" value="AMERICAN EXPRESS checked" onClick="function4();">
</form>
</body>
</html>

    
      
        
    
  














Related examples in the same category
1.'defaultChecked' Example
2.Radio Button status Example
3.Radio buttons in a form
4.Using the onPropertyChange Property
5.Radio action
6.Methods and Properties of the Radio Object
7.Determining the Value of the Selected Radio Button
8.Scripting a Group of Radio Objects
9.Finding the Selected Button in a Radio Group
10.An onClick event Handler for Radio Buttons
11.Get the radio button selection
12.Get the select radio button and its value
13.Cycle the selected radio buttons
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.