jQuery效果-隐藏与显示
html
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>jquery</title> <script type="text/javascript" src="js/jquery-3.0.0.min.js"></script> <script type="text/javascript" src="js/try.js" ></script> </head> <body> <p>how are you </p> <button id="hide">隐藏</button> <button id="show">显示</button> </body> </html>
js
$(document).ready(function(){
$("#hide").click(function(){
$("p").hide(1000);
})
$("#show").click(function(){
$("p").show(1000);
});
});
效果:

2017-09-21 11:58:16
越努力越幸运

浙公网安备 33010602011771号