我正在使用 David Stutz 的引导多选插件,我在显示“全部选定”时遇到问题。使用 allSelectedText 方法可以工作,但在使用“allSelectedText”回调时它会被覆盖。
使用上一个问题的答案,我尝试获取孩子的数量并检查他们是否全部被选中(请参阅评论)
注意 - 如果我删除“numberofOptions”,这将起作用
使用buttonText回调/allSelectedText方法,这里是文档的链接 - http://davidstutz.github.io/bootstrap-multiselect/
感谢您的意见。
JS
$(document).ready(function() {
$('#multiselect').multiselect({
//Following line is being overridden by the numberOfOptions
allSelectedText: 'All Selected',
buttonText: function(options, select) {
//grab the number of childeren to later return 'all selected'
var numberOfOptions = $(this).children('option').length;
if (options.length === 0) {
return 'Select';
}
else if (options.length > 1) {
return '1+ Selected';
}
//This line is calculating number of options,
//displaying 'AllSelected in the label'
else if (options.length …Run Code Online (Sandbox Code Playgroud) 我有一个名为Product_Id(类型字符串)的字段,其长度为7并从0开始.但是当通过VBA插入文本类型的表字段时,零未插入.
这是插入查询:
dbs.Execute "INSERT INTO tablename (PROD_NBR)VALUES (" & prodID & ");"
Run Code Online (Sandbox Code Playgroud)