Get value from radio Button onchange


Topic: Get value from radio Button onchange

steve@gulfnetwork.com pro premium priority asked 6 years ago

With this script shouldn't I be able to return the value of a radion button in a qroup?

$(document).ready(function(){ $('#regForm').change(function(){ selected_value = $("input[name='groupOfMaterialRadios']:checked").val(); alert(selected_value); }); });

Piotr Glejzer staff commented 6 years ago

Hi,
do you have some example code HTML with is 'working' with that code JS? Can you show me an example in our snippets?
https://mdbootstrap.com/snippets/
Best,
Piotr


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Open

Specification of the issue
  • User: Pro
  • Premium support: Yes
  • Technology: MDB jQuery
  • MDB Version: 4.6.1
  • Device: Desktop
  • Browser: Firefox
  • OS: Windows 7
  • Provided sample code: No
  • Provided link: No