解决layui lay-search选完其他选项, 手工清空选项 又恢复最初的选项?
时间:2020-07-22 16:51:30
收藏:0
阅读:963
$(document).on("input propertychange", "select[lay-search] ~ div input", function () {
if ($(this).val() == "") {
//清空原选项值
$("#Type").val(‘‘);
//清除layui选中状态
$(this).parent().next().find(".layui-this").addClass(" layui-hide").removeClass("layui-this");
}
});
原文:https://www.cnblogs.com/BlackAgg/p/13360914.html
评论(0)