Skip to content
Advertisement

How to use if..else statement on a radio button with jQuery

I have this field at my form for calculating Value Added Tax:

JavaScript

Now within jQuery, I want to check that if the radio button is set to the value on, do the calculation.

So how can I do that with jQuery.

I would really appreciate any idea or suggestion from you guys…

Thanks in advance.

Advertisement

Answer

I have added a listener to get the value from the radio button.

JavaScript

Here’s an example:

for more info in Jquery refer to this question

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement