我正在尝试使用select2库与我的页面使用php一切正常工作甚至表现良好但问题是我无法搜索任何搜索默认禁用,这是我使用此库的主要原因。
<https://jsfiddle.net/udp3qq7t/5/
答案 0 :(得分:0)
我的代码中没有任何问题。以下是我从代码中提取的select two的工作演示。
<select class="scselect" name="cname">
<option>Select</option>
<option>Pakistan</option>
<option>Dubai</option>
<option>Bangladesh</option>
</select>
<script>
$(document).ready(function() {
$(".scselect").select2({});
});
</script>
确保PHP代码不会破坏您的输出
答案 1 :(得分:0)
I have sort out the issue by Select2 doesn't work when embedded in a bootstrap modal post.By (remove tabindex="-1" from modal)