show是层的ID名,
隐藏层:document.getElementById("show").style.display = "none"
显示层:document.getElementById("show").style.display = "block"
JS控制A标记的href跳转可以按照以下方法实现:var a = document.getElementById("aHref")
a.href = '/user'
//取消<a>标签原先的onclick事件,使<a>标签点击后通过href跳转(因为无法用js跳转)
a.setAttribute("onclick",'')
//激发标签点击事件OVER
a.click("return false")
<!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" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/htmlcharset=UTF-8">
<title>Document</title>
</head>
<body>
<a>其它相关</a>
<ul class="nav-sort sort-last">
<li><a href="" target='_blank'>子菜单1</a></li>
<li><a href="" target='_blank'>子菜单2</a></li>
<li><a href="" target='_blank'>子菜单3</a></li>
</ul>
</body>
<!-- 引入jquery -->
<script src="libs/script/jquery.min.js"></script>
<script type="text/javascript">
//把ul隐藏掉
$('.nav-sort.sort-last').hide()
//把 a 隐藏掉
$('.nav-sort.sort-last').prev().hide()
</script>
</html>