<html>
<head>
<script type="text/javascript" src="/jquery/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("button").click(function(){
$("p").hide(1000,function(){
alert("The paragraph is now hidden");
});
});
});
</script>
</head>
<body>
<button type="button">Hide</button>
<p>This is a paragraph with little content.</p>
<p>This is a paragraph with little content.</p>
<p>This is a paragraph with little content.</p>
</body>
</html>
callback函数alert()一共提示了三次,我想让它只提示一次,需要如何修改代码?
有没有可能通过one()来实现?
慕姐4208626
蛊毒传说
相关分类