标签:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> <script src="js/jquery.js"></script> <script> window.onload = function(){ document.getElementById(‘btnok‘).onclick = function(){ //1.显示所有异常元素 //$(‘div:hidden‘).show(3000); //2.隐藏所有可见元素 $(‘div:visible‘).hide(3000); } } </script> </head> <body> <input type="button" id="btnok" value="匹配"> <hr> <div style="width:300px; height:300px; background-color:red; display:none;"></div> <div style="width:300px; height:300px; background-color:red; "></div> </body> </html>
标签:
原文地址:http://www.cnblogs.com/leigood/p/4890558.html