<!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>
转载于:https://blog.51cto.com/leigood/1704034