二級菜單不顯示為什么?
</style>
<script src="http://cdn.bootcss.com/jquery/3.1.1/jquery.js"></script>
<script type="text/JavaScript">
?? ?$(function(){
?? ??? ?$(".navname").mouseover(function(){
?? ??? ??? ?$(this).children("ul").show();
?? ??? ?});
?? ?$(function(){
?? ??? ?$(".navname").mouseout(function(){
?? ??? ??? ?$(this).children("ul").hide();
?? ??? ?});
?? ?})
</script>
</head>
<body>
?? ?<div id="menu">
?? ??? ?<ul>
?? ??? ??? ?<li><a href="#">首頁</a></li>
?? ??? ??? ?<li class="navname"><a href="#">課程大廳</a>
?? ??? ??? ??? ?<ul>
?? ??? ??? ??? ??? ?<li><a href="#">zhognwen</a></li>
?? ??? ??? ??? ??? ?<li><a href="#">yingwen</a></li>
?? ??? ??? ??? ??? ?<li><a href="#">hanyu</a></li>
?? ??? ??? ??? ?</ul>
?? ??? ??? ?</li>
2018-06-17
鼠標(biāo)移出那就不用再聲明匿名函數(shù)了,仔細(xì)看一下鼠標(biāo)移出上面還多了個(gè)? $(function(){?