夺命雷公狗jquery---5可见选择器

时间:2023-03-09 21:53:31
夺命雷公狗jquery---5可见选择器
<!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>