<style>
</style>
</head>
<body>
<h1>jQuery搜索框过滤筛选</h1>
<section class="list-wrap">
<label for="search-text">搜索列表内容</label>
<input type="text" id="search-text" placeholder="美食大搜索" class="search-box">
<span class="list-count"></span>
<ul id="list">
<li class="in">苹果派</li>
<li class="in">南瓜派</li>
<li class="in">香蕉奶油派</li>
<li class="in">桃黑莓馅饼</li>
<li class="in">巧克力草莓蛋糕</li>
<li class="in">巧克力南瓜蛋糕</li>
<li class="in">巧克力和薄荷控</li>
<li class="in">红丝绒蛋糕</li>
<li class="in">非水果樱桃</li>
<span class="empty-item">无数据</span>
</ul>
</section>
<script>
function searching() {
types = isNull($('.types option:checked').val());
s = isNull($('.status option:checked').val());
//console.log(s);
//console.log(names);
refresh_list(1, types, s);
}
$('.sure_mask_close,sure_mask_cancel').click(function() {
$('.sure_mask2').hide();
$('.sure_mask3').hide();
});
function text30(t) {
if(t.length > 30) {
return t.slice(0, 30) + '……'
} else {
return t
}
}
</script>
</body>