AutoCAD 3DMAX C语言 Pro/E UG JAVA编程 PHP编程 Maya动画 Matlab应用 Android
Photoshop Word Excel flash VB编程 VC编程 Coreldraw SolidWorks A Designer Unity3D
 首页 > JavaScript

jQuery使用hide方法隐藏页面上指定元素的方法

51自学网 http://www.wanshiok.com
jQuery,hide方法,隐藏页面,指定元素

本文实例讲述了jQuery使用hide方法隐藏页面上指定元素的方法。分享给大家供大家参考。具体如下:

下面的JS代码隐藏了网页中所有<p>标签的内容

<!DOCTYPE html><html><head><script src="js/jquery.min.js"></script><script>$(document).ready(function(){ $("button").click(function(){  $("p").hide(); });});</script></head><body><h2>This is a heading</h2><p>This is a paragraph.</p><p>This is another paragraph.</p><button>Click me</button></body></html>

希望本文所述对大家的jQuery程序设计有所帮助。


jQuery,hide方法,隐藏页面,指定元素  
上一篇:js动态修改表格行colspan列跨度的方法  下一篇:jquery使用hide方法隐藏指定id的元素