show是层的ID名,
隐藏层:document.getElementById("show").style.display = "none"
显示层:document.getElementById("show").style.display = "block"
<!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>