<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<style>
* {
margin: 0px;
padding: 0px;
}
</style>
</head>
<body>
<input type="text">
<ul>
<ol>0</ol>
<ol>01</ol>
<ol>012</ol>
<ol>0123</ol>
<ol>01234</ol>
<ol>012345</ol>
<ol>0123456</ol>
<ol>01234567</ol>
<ol>012345678</ol>
<ol>0123456789</ol>
<ol>0123456789</ol>
</ul>
<script type="text/javascript" src="jquery-3.0.0.min.js"></script>
<script>
$(function () {
$("input").change(function () {
var val = $(this).val();
if (!val) {
$("ol").slideDown();
return;
}
var $showOl = $("ol:contains(" + val + ")")
$("ol").not($showOl).slideUp();
$showOl.slideDown();
}).keyup(function () {
$(this).change();
});
});
</script>
</body>
</html>