Setup radio button : RadioButton « Dojo toolkit « JavaScript DHTML






Setup radio button

 
<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>

   
  








Dojo-toolkit.zip( 3,849 k)

Related examples in the same category

1.Set RadioButton group and default selection