mercredi 17 janvier 2018

Store values from checkboxes in javascript

I have the following project http://ift.tt/2DGlxqP and the next issue. I want to select all checkboxes status and store them in variables as :

var checkbox1 = checked ? 1 : 0;
var checkbox2 = checked ? 1 : 0;
var checkbox3 = checked ? 1 : 0;

After that, i have to compare with the answers from js file and if all are equal, increment 1.

For now i am stuck at storing values from checkboxes in variables. How can i do that ?




Aucun commentaire:

Enregistrer un commentaire