how to achieve dropdown multiple select options and display the selected values once apply is clicked

how to achieve dropdown multiple select options from list and has 2 button – clear and apply as per attached screenshot enter image description here and display the selected values once apply/clear all button is clicked from dropdown via JavaScript or jQuery as per attached screenshot enter image description here