日期:2014-05-16 浏览次数:20460 次
<div id="messages-fj" style="display: none;">
<h3>附件管理</h3>
<div id="messages-fj-con">
<p>本行测试<br/><small><a href='javascript:void(0)' onclick='attr_del(this)' class='remove-link'>删除</a> | <a href='#' class='remove-link'>设为封面</a></small></p>
</div>
</div>
function attr_del(m_this)
{
_p=$(m_this).parent().parent();
_p.remove();
alert($("#messages-fj-con").html());//输出
}
<div id="messages-fj" style="display: none;">
<h3>附件管理</h3>
<div id="messages-fj-con">
<p>本行测试<br/><small><a id='vv' href='javascript:void(0)' onclick='attr_del(this)' class='remove-link'>删除</a>
------解决方案--------------------
<a href='#' class='remove-link'>设为封面</a></small></p>
</div>
</div>
<script>
function attr_del(m_this)
{
_p=$(m_this).parent().parent();
_p.remove();
alert($("#messages-fj-con").html());//输出
}
var $a = $('#vv');
var $b = $a.parent();
var $c = $b.parent();
$c.remove();
var $e = $("#messages-fj-con").html();
</script>