日期:2014-05-16 浏览次数:20388 次
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<style>
#pop{position:absolute;left:400px;width:300px;bottom:200px;border:solid 1px black;display:none;}
</style>
<script>
var height = 200;
function show() {
if ($('#pop').is(':visible')) $('#pop').animate({ height: 0 }, 300, function () { $('#pop').hide() });
else $('#pop').show().animate({ height: 200 }, 300);
}
</script>
<div id="pop"></div>
<input type="button" value="SHOW" onclick="show()" />