1.点击div class=aa时,显示其下方隐藏的div class=bb,同时跳转页面至cc.html
请问这个JS怎么写?
2.鼠标经过div class=aa时,显示其下方隐藏的div class=bb, 点击aa,跳转页面至cc.html
这个又怎么写?
你上面说了两个效果。。。。先给你一个效果。。看看。。
<body>
<div class="aa">aa</div>
<div class="bb" style="display:none">bb</div>
</body>
<script>
$( document ).ready(function() {
$(".aa").click(function(){
$(".bb").show();
window.open("/cc.html")//引号内是cc.html的路劲
})
})
</script>
2.
<script>
$( document ).ready(function() {
$(".aa").click(function(){
window.open("/cc.html")//引号内是cc.html的路劲
}).mouseout(function(){
$(".bb").show();
})
})
</script>