Home » Php » radio button onclick in bootstrap issue

radio button onclick in bootstrap issue

Posted by: admin June 30, 2018 Leave a comment

Questions:

I am trying to use onclick even with radio butttons in bootstrap but the onclick event is not firing. i am using this code

<input type="checkbox" onclick="alert('Scenery!')"/> 

But when i use

 <label class="" onclick="alert('Scenery!')">
            <input type="checkbox" id="scenery-option" onclick="alert('Scenery!')"/> 
        </label>

But when i use above code and click on label its working but on radio button its not working

Answers: