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方法隐藏指定id的元素

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

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

下面的代码通过jQuery的hide方法隐藏了id=test的元素

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

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


jquery,hide方法,隐藏,指定id,元素  
上一篇:jQuery使用hide方法隐藏页面上指定元素的方法  下一篇:jQuery使用hide方法隐藏指定元素class样式用法实例