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

jquery使用remove()方法删除指定class子元素

51自学网 http://www.wanshiok.com
jquery,remove()方法,删除,指定,class,子元素

本文实例讲述了jquery使用remove()方法删除指定class子元素的方法。分享给大家供大家参考。具体实现方法如下:

<!DOCTYPE html><html><head><script src="js/jquery.min.js"></script><script>$(document).ready(function(){ $("button").click(function(){  $("p").remove(".italic"); });});</script></head><body><p>This is a paragraph in the div.</p><p class="italic"><i>This is another paragraph in the div.</i></p><p class="italic"><i>This is another paragraph in the div.</i></p><button>Remove all p elements with class="italic"</button></body></html>

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


jquery,remove()方法,删除,指定,class,子元素  
上一篇:jQuery使用empty()方法删除元素及其所有子元素的方法  下一篇:jQuery使用removeClass方法删除元素指定Class的方法