//重置按钮重置下拉框 $("#searchReset").click(function(){ document.getElementById("cpCode").options.selectedIndex = 0; //回到初始状态 $("#cpCode").selectpicker('refresh');//对下拉框进行重置刷新 });
直接上代码,按理说bootstrap有自己的方法,我这里只是应急搜的解决办法。
//重置按钮重置下拉框 $("#searchReset").click(function(){ document.getElementById("cpCode").options.selectedIndex = 0; //回到初始状态 $("#cpCode").selectpicker('refresh');//对下拉框进行重置刷新 });
直接上代码,按理说bootstrap有自己的方法,我这里只是应急搜的解决办法。
转载于:https://www.cnblogs.com/yt975548/p/8059906.html