我知道这很可能不是那么“聪明”的问题,但我不能理解这个函数是如何工作的,我想要的就是用p_remove类删除给定表中的<p>标记,下面是我的jquery代码:
$(document).ready(function() {
$('.p_remove').each( function(){
$("<p>" + $('.p_remove').text() + "</p>").replaceWith("" + $('.p_remove').text() + "");
});
});这个脚本实际上是不工作的,因为之前的工作脚本没有以我想要的方式工作:)谢谢帮助!
发布于 2011-02-22 17:38:35
$('.p_remove').each( function(){
$self = $(this)
$self.replaceWith( "<p>" + $self.text() + "</p>" );
});https://stackoverflow.com/questions/5076363
复制相似问题