日期:2014-05-16  浏览次数:20404 次

麻烦帮我看下 当我点击空白地方 div为什么没有消失 还有就是层级问题

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
* {
    margin: 0px;
    padding: 0px;
}
 
.select_input {
    border:1px solid #DCDCDC;
    cursor: pointer;
    width:180px;
    height: 28px;
    margin: 10px 0px 0px 10px;
    padding: 0 0 0 5px;
}
 
.select_content {
    border: 1px #CCCCCC solid;
    width: 185px;
    height: 290px;
    overflow: auto;
    overflow-x: hidden;
    margin-left: 10px;
    position:absolute;
    top:40px;
    left:0;
    z-index:99;
}
 
.select_content span {
    cursor: pointer;
    display: block;
    color: #788F72;
    width: 180px;
    height: 22px;
    line-height: 20px;
    padding: 4px 0px 0px 5px;
    font-size: 12px;
}
 
.select_content span:hover {
    background: #FFFFCC;
    color: #000;

</style>
<script type="text/javascript">
// 定义省份城市数组
var city=new Array();
city["北京市"]=["东城区","西城区", "崇文区", "宣武区","朝阳区","海淀区","丰台区","石景山区","房山区","通州区","顺义区","昌平区","大兴区","怀柔区","平谷区","门头沟区","密云区","延庆区","其他"];
city["广东省"]=["广州","深圳", "珠海","汕头","韶关","佛山","江门","湛江","茂名","肇庆","惠州","梅州","汕尾","河源","阳江","清远","东莞","中山","潮州","揭阳","云浮","其他"];
city["上海市"]=["黄浦区","卢湾区", "徐汇区","长宁区","静安区","普陀区","闸北区","虹口区","杨浦区","宝山区","闵行区","嘉定区","松江区","金山区","青浦区","南汇区","奉贤区","浦东新区","崇明区","其他"];
city["天津市"]=["和平区","河东区", "河西区","南开区","河北区","红桥区","塘沽区","汉沽区","大港区","东丽区","西青区","北辰区","津南区","武清区","宝坻区","静海县","宁河县","蓟县","其他"];
city["重庆市"]=["渝中区","大渡口区", "江北区","南岸区","北碚区","渝北区","巴南区","长寿区","双桥区","沙坪坝区","万盛区","万州区","涪陵区","黔江区","永川区","合川区","江津区","九龙坡区","南川区","綦江县","潼南区","荣昌区","璧山区","大足区","铜梁县","梁平县","开县","忠县","城口县","垫江区","武隆县","丰都县","奉节县","云阳县","巫溪县","巫山县","其他"];
city["辽宁省"]=["沈阳","大连","鞍山","抚顺","本溪","丹东","锦州","营口","阜新","辽阳","盘锦","铁岭","朝阳","葫芦岛","其他"];
city["江苏省"]=["南京","苏州","无锡","常州","镇江","南通","泰州","扬州","盐城","连云港","徐州","淮安","宿州","其他"];
city["湖北省"]=["武汉","黄石","十堰","荆州","宜昌","襄樊","鄂州","荆门","孝感","黄冈","咸宁","随州","仙桃","天门","潜江","神农架","其他"];
city["四川省"]=["成都","自贡","攀枝花","泸州","德阳","绵阳","广元","遂宁","内江","乐山","南充","眉山","宜宾","广安","达州","雅安","巴中","资阳","其他"];
city["陕西省"]=["西安","铜川","宝鸡","咸阳","渭南","延安","汉中","榆林","安康","商洛","其他"];
city["河北省"]=["石家庄","唐山","秦皇岛","邯郸","邢台","保定","张家口","承德","沧州","廊坊","衡水","其他"];
city["山西省"]=["太原","大同","阳泉","长治","晋城","朔州","晋中","运城","忻州","临汾","吕梁","其他"];
city["河南省"]=["郑州","开封","洛阳","平顶山","安阳","鹤壁","新乡","焦作","濮阳","许昌","漯河","三门峡","南阳","商丘","信阳","周口","驻马店","焦作","其他"];
city["吉林省"]=["吉林","四平","辽源"