jquery可见性选择器(匹配匹配所有显示的元素)
生活随笔
收集整理的這篇文章主要介紹了
jquery可见性选择器(匹配匹配所有显示的元素)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>可見性選擇器</title><meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /><style type="text/css">.yang{ border-collapse: collapse; width:500px;height:30px;border:1px solid red;"}</style><script type="text/javascript" src="jquery-1.7.1.min.js"></script><script type="text/javascript">/*:hidden //匹配所有隱藏的元素:visible //匹配所有顯示的元素*/window.onload=function(){$('#btnOk').click(function(){//匹配匹配所有顯示的元素并隱藏
$('div:visible').hide();});};</script></head><body><div>div1</div><div style="display:none">div2</div><hr/><input type="button" id='btnOk' value='確定' /></body>
</html>
?
總結
以上是生活随笔為你收集整理的jquery可见性选择器(匹配匹配所有显示的元素)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Nova如何统计节点硬件资源
- 下一篇: AutoCAD 2011、Map 3D