我使用了带有搜索输入和“添加”按钮的自定义选择框。此输入字段的作用类似于搜索和搜索下拉选项中的值。但是当值与值不匹配时,我需要点击该添加按钮时,该字段的值应该添加到该选项中,并且还充当下拉列表的选定值。请帮助...如何获取输入文本字段在选择框中的值选项值
感谢名单..
$(function() {
$(".standards").customselect();
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src='http://classvita.com/admin/res/javascripts/jquery-customselect.js'></script>
<link href='http://classvita.com/admin/res/stylesheets/jquery-customselect.css' rel='stylesheet' />
<select name='standard' class='custom-select standards'>
<option value=''>Add Particular</option>
<option value='1'>abc</option>
<option value='2'>aabc</option>
<option value='3'>abbc</option>
</select>
添加完整的代码至今。我们不知道什么是您的添加按钮和其他细节 – ScanQR
只需点击添加特定的,有一个下拉列表,并在最后它有一个添加按钮..和它的代码是在链接的js文件 –
你能告诉我们什么是代码添加新项目?它是由插件生成的吗? – ScanQR