<script language="javascript">
function test(){
    var Radio1 = document.createElement("input");
    Radio1.type="radio";
    Radio1.style.position = "absolute";
    Radio1.style.left = 200;
    Radio1.style.top =20;
    Radio1.onclick=function(){
      if (this.checked) this.checked=false;
      else this.checked=true;
    }
    document.all.mydiv.appendChild(Radio1);
}
</script>
<input type=button onclick="test()" value="test">
<div id="mydiv"></div>