Set RadioButton group and default selection : RadioButton « Dojo toolkit « JavaScript Tutorial






<html>
  <head>
    <link rel="StyleSheet" type="text/css"
      href="js/dojo/dijit/themes/tundra/tundra.css">
    <script type="text/javascript">
      var djConfig = {
        baseScriptUri : "js/dojo/",
        parseOnLoad : true
      };
    </script>
    <script type="text/javascript" src="js/dojo/dojo/dojo.js"></script>
    <script>
      dojo.require("dojo.parser");
      dojo.require("dijit.form.RadioButton");
    </script>
  </head>
  <body class="tundra">
    <input dojoType="dijit.form.RadioButton" id="val1" name="group1" checked="checked" value="Programmer" type="radio" />
    <label for="val1"> Programmer </label>
    <input dojotype="dijit.form.RadioButton" id="val2"  name="group1" value="Designer" type="radio" />
    <label for="val2"> Designer </label>
    <input dojotype="dijit.form.RadioButton" id="val3"  name="group1" value="Developer" type="radio" />
    <label for="val3"> Developer </label> 
   </div>
  </body>
</html>








29.47.RadioButton
29.47.1.Setup radio button
29.47.2.Set RadioButton group and default selection