jquery-淡入淡出

<!DOCTYPEhtml>

<html>

<head>

<metacharset="utf-8"/>

<title></title>

</head>

<body>

<headerid="tab"style="height:50px;width:200px;background-color:red;display:none;"></header>

<inputid="button"type="submit"value="显示"/>

<inputid="button1"type="submit"value="隐藏"/>

<scripttype="text/javascript"src="js/jquery-1.8.0.min.js"></script>

<script>

$(document).ready(function(){

dandan=$("#tab");

$("#button").click(function(){

alert("777777777777");

dandan.fadeIn(3000);

});

$("#button1").click(function(){

alert("kkkkkk");

dandan.fadeOut(3000);

})

});

</script>

</body>

</html>

相关推荐