I have a list like this :
<p>Please select :</p>
<script type="text/javascript"></script>
<select id='pre-selected-options1' multiple='multiple'>
<option value='elem_1' selected>1</option>
<option value='elem_2'>2</option>
<option value='elem_3'>nextoption</option>
<option value='elem_4' selected>option 1</option>
<option value='elem_100'>option 2</option>
</select>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0/jquery.min.js"></script>
<script src="js/jquery.multi-select.js"></script>
<script type="text/javascript">
$('#pre-selected-options1').multiSelect();
</script>
</div>
i have a text box and i need to add the text box values into this list. For time being i need it like whenever the page reloads everything entered is reset. Later on i will connect to db.
<label>Enter: </label>
<input type="text" name="" class="input-default"><button type="button" class="btn btn-success btn-sm m-b-10 m-l-5">Add</button>
How to add the value entered in text box to this list on button click?