<p class="notice_js" data_id="46">对不起,您对“<a href="http://www-test.funshichang.cn/product/view?id=310" class="product_name_n" target="_blank">有投票</a>”的评论不符合安全规范,已被管理员删除</p>
如上 需求: 我想点击有投票 不影响 对<p> 添加的事件
$(".notice_js").click(function(event){ var el = event.target; if(el.className !=='product_name_n' && el.className !== 'post_name_n' && el.className !== 'discovery_name_n') { var data_id = $(this).attr('data_id'); window.location.href="/notice/detail?id="+data_id; } });