radio button
-
count how many times a radio button is selected and ans is shown in a text box
-
count how many times a radio button is selected and ans is shown in a text box
-
count how many times a radio button is selected and ans is shown in a text box
Oh, you have to do some homework? Or is it a suggestion for "Training Questions for Students (beginner level)"?
-
count how many times a radio button is selected and ans is shown in a text box
you need a counter which increment each time when radio button is checked
-
count how many times a radio button is selected and ans is shown in a text box
Make a variable public or private. using public to make it more easy to understand... and place it outside your function so it holds its value after each click. private will also work, but then it is accessible only within the class itself.. that is a whole different discussion. public int counter =0; then in your click event for the radio button increase the counter. counter++; should do the trick... Not going to write it for you though.
=)
-
count how many times a radio button is selected and ans is shown in a text box
you also can do by the javascript here when radio button is clicked start your counter and store it in a cookie and each time clicked increase the counter this will be client side functionality :)