<style type="text/css">
body{margin: 0;}
.div{
display: flex;
flex-direction: column;
align-items: center;
width: 600px;
top: 20px;
position: absolute;
left: calc(50% - 300px);
}
table{
margin-top: 30px;
background-color: black;
}
tr{
text-align: center;
}
thead th{
background: white;
}
th, tr{
height: 30px;
border-radius: 1px;
width: 80px;
}
table th:nth-child(3){
width: 200px;
}
.scan{
display: flex;
flex-direction: column;
align-items: center;
}
</style>
<body>
<div class="div" >
<div class="scan">
<label>
查询:
<input class="f_text">
</label>
</div>
<table class="table">
<thead>
<tr>
<th>姓名</th>
<th>性别</th>
<th>暂住地</th>
</tr>
</thead>
<tbody>
<tr>
<th>张山</th>
<th>男</th>
<th>浙江宁波</th>
</tr>
<tr>
<th>李四</th>
<th>女</th>
<th>浙江杭州</th>
</tr>
<tr>
<th>王五</th>
<th>男</th>
<th>湖南长沙</th>
</tr>
<tr>
<th>找六</th>
<th>男</th>
<th>浙江温州</th>
</tr>
<tr>
<th>Rain</th>
<th>男</th>
<th>浙江杭州</th>
</tr>
<tr>
<th>MAXMAN</th>
<th>女</th>
<th>浙江杭州</th>
</tr>
<tr>
<th>王六</th>
<th>男</th>
<th>浙江杭州</th>
</tr>
<tr>
<th>李字</th>
<th>女</th>
<th>浙江杭州</th>
</tr>
<tr>
<th>李四</th>
<th>男</th>
<th>湖南长沙</th>
</tr>
</tbody>
</table>
</div>
<script type="text/javascript">
$("table tr:odd").css('background-color','#FFF38F');
$("table tr:even").css('background-color','#FFFFEE');
$('input').keyup(function(){
$('table tbody tr').hide().filter(":contains("+$(this).val()+")").show();
});
</script>
</body>
```3333333
```css
<body>
<div class="div" >
<form action="">
<select name="province" class="province">
<option>
请选择省份
</option>
</select>
<select name="city" class="city">
<option >
请选择城市
</option>
</select>
</form>
</div>
<script type="text/javascript">
var province = ["河北省","山西省","辽宁省"];
var city = [
["石家庄市","唐山市","秦皇岛市","邯郸市","张家口市","保定市"],
['太原市','大同市','阳泉市', '长治市','运城市','临汾市'],
['沈阳市', '大连市', '鞍山市', '盘锦市', '朝阳市']
];
var prov_select = $(".province");
$.each(province,
function (i,n){
prov_select.append("<option selected>"+n+"</option>");
}
)
prov_select.get(0).selectedIndex = 0;
prov_select.change(function (){
var id = $(".province").get(0).selectedIndex;
$(".city option[value='1']").remove();
$.each(city[id-1],
function (i,n){
$(".city").append("<option value='1' selecte