I have a button that activates a script to create a new radio button. I want the radio button to be of the class draggable. However, my code isn't quite working.
Any thoughts on this are appreciated.
<head>
<script Language="JavaScript">
function modify(){
var newElem= document.createElement("radio")
newElem.id = "newradio"
newElem.appendChild(newElem)
document.body.appendChild(newElem)
document.getElementById("emphasis1").childNodes[0].nodeValue = "first "
}
</script>
</head>
<body>
<button onClick="modify()">Add a radio</button>
</body>