0
        var day = new Array();
     $(':checkbox:checked').each(function(i){
     day.push($(this).val());
      });
       alert(day);

which return this:

enter image description here

but I would like to get this:

`3`,`10`,`16`

thanks

0

2 Answers 2

1
day.push('`' + $(this).val() + '`');
Sign up to request clarification or add additional context in comments.

1 Comment

thanks, exactly what I was trying to do for 2 hours. I will accept the answer in 8 min... ;-)
0

It is in an array. Alerts just show arrays differently. try looking at it in console.log() you will see

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.