单击事件
<style>
#ul01{
display:none
}
</style>
<div id="">
<div id="li01">
图片
<div id="ul01">
<p>123456</p>
<p>123456</p>
<p>123456</p>
<p>123456</p>
</div>
</div>
</div>
<script>
li01.onclick = function(){
ul01.style.display = "block"
ul01.onmouseover = function(){
ul01.style.display = "block"
}
ul01.onmouseout = function(){
ul01.style.display = "none"
}
}
</script>
鼠标移动下拉事件
function fn(canshu1,canshu2){
var li01 = document.getElementById(canshu1);
li01.onmouseover = function(){
ul01.style.display = "block"
}
li01.onmouseout = function(){
ul01.style.display = "none"
}
}
fn("li01","ul01")