-
无法校验select
$.validator.setDefaults({ ignore : ":hidden:not(select)", //解决无法校验select submitHandler : function() { save(); } }); - 刷新select
$.ajax({ url : '/common/dict/list/astrict_type', cache: false , success : function(data) { var html = ''; for (var i = 0; i < data.length; i++) { if (typeStr == '' || typeStr.indexOf(data[i].value) < 0) { html += '<option value="' + data[i].value + '">' + data[i].name + '</option>' } } $("#astrict_type").append(html); $("#astrict_type").chosen({ search_contains : true, maxHeight : 200 }); $("#astrict_type").trigger("chosen:updated"); //更新select } }); - 分页查询错误
if( window.event){ $('#exampleTable').bootstrapTable('refreshOptions',{pageNumber:1});} $('#exampleTable').bootstrapTable('refresh'); }
thymeleaf 相关
最新推荐文章于 2024-08-13 21:52:22 发布
本文分享了在使用$.validator时遇到的select元素无法正确验证的问题解决方案,通过设置默认忽略属性来解决。同时介绍了如何利用$.ajax进行异步请求刷新select选项,并触发更新事件以实现动态内容的实时加载。
495

被折叠的 条评论
为什么被折叠?



