Setup radio button : 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.CheckBox");

    </script>
  </head>
  <body class="tundra">
        <input type="radio" id="rb1" dojoType="dijit.form.RadioButton" />&nbsp;
        <label for="rb1">Item 1</label>
        <input type="radio" id="rb2" dojoType="dijit.form.RadioButton" />&nbsp;
        <label for="rb2">Item 2</label>
        <input type="radio" id="rb3" dojoType="dijit.form.RadioButton" />&nbsp;
        <label for="rb3">Item 3</label>
        <input type="radio" id="rb4" dojoType="dijit.form.RadioButton" />&nbsp;
        <label for="rb4">Item 4</label>
       
  </body>
</html>








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