3
<input type="radio" value="10" name="attack" onClick="sendid(this.value)"/> Attack 1
<input type="radio" value="20" name="attack" onClick="sendid(this.value)"/> Attack 2

When I click on the radio, immediately I get the response! But along with the response, I want to clear the check radio! How can I do that?

user3636516
  • 305
  • 1
  • 2
  • 10

1 Answers1

0

Set the checked property to false. I suggest passing the element to your function (not just its value):

onClick="sendid(this)"

JavaScript:

function sendid(element){
    element.checked = false;
}

This will work but it doesn't seem like a radio button is the most appropriate tool for this job.

MrCode
  • 63,975
  • 10
  • 90
  • 112