Skip to content

difficulties to retrieve the selected values ​​and adding space to the values ​​after the comma #217

Answered by sa-si-dev
mafupaclement asked this question in Q&A
Discussion options

You must be logged in to vote

@mafupaclement you can use the below code to get value with spaces.

document.querySelector('#sample-multi-select').value.join(', ')
// returns "value1, value2, value3"

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@mafupaclement
Comment options

Answer selected by sa-si-dev
Comment options

You must be logged in to vote
3 replies
@sa-si-dev
Comment options

@mafupaclement
Comment options

@sa-si-dev
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants