点击出现二级菜单
*{ margin:0px auto; padding:0px; } .yiji{ width:200px; height:40px; background-color:red; color:#fff; text-align:center; line-height:40px;h vertical-align:middle; border:1px solid #FFF; } .erji1{ width:200px; height:40px; background-color:#F63; color:#fff; text-align:center; line-height:40px; vertical-align:middle; border:1px solid #FFF; } #erji2{ display:none; } #erji3{ display:none; } #erji4{ display:none; }首页111人才111市场111
点击后主菜单换成点击的内容
#caidan{ width:200px; height:40px; border:1px solid #999; text-align:center; line-height:40px; vertical-align:middle; } .list{ width:200px; height:40px; border:1px solid #999; border-top-width:0px; text-align:center; line-height:40px; vertical-align:middle; display:none; } #caidan,.list:hover{ cursor:pointer; } .list:hover{ background-color:#63F; }
中国山东济南济宁威海淄博
function Show() { var list = document.getElementsByClassName("list"); //显示列表 for(var i=0;i