- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How can I send radio button value in PHP using JavaScript?
ID has to be unique in a document −
var option_avail = $('input[name=option_avail]:checked', '#controls').val() <label class="btn btn-primary active"> <input type="radio" class="form-control" name="option_avail" value="Option_one" checked /> firstoption </label> <label class="btn btn-primary "> <input type="radio" class="form-control" name="option_avail" value="Option_two" /> secondoption </label> <label class="btn btn-primary "> <input type="radio" class="form-control" name="option_avail" value="Option_three" /> thirdoption </label>
Advertisements