<div class="catListComment">
<div class="divRecentCommentAticle"></div>
<div class="divRecentCommentAticle"></div>
</div> 如何追加成这样 <div class="catListComment">
<div class="divRecentCommentAticle"></div>
<div class="divRecentCommentAticle"></div>
</div>
<div class=box-bottom>123</div> $(".catListComment").after('<div class=box-bottom>123</div>'); 这样不行的?
<div class="divRecentCommentAticle"></div>
<div class="divRecentCommentAticle"></div>
</div> 如何追加成这样 <div class="catListComment">
<div class="divRecentCommentAticle"></div>
<div class="divRecentCommentAticle"></div>
</div>
<div class=box-bottom>123</div> $(".catListComment").after('<div class=box-bottom>123</div>'); 这样不行的?
$(".catListComment").after('<div class="box-bottom">123</div>');在语法上没有问题啊~难道你运行不行?
不是里面
是jquery 运行不出来?不知道为什么了
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<SCRIPT type="text/javascript" src="jquery.js"></SCRIPT>
<SCRIPT type="text/javascript">
(function(){$(".catListComment").after('<div class=box-bottom>123</div>');
alert($(".catListComment"));
})(jQuery); </SCRIPT>
</head><body><div class="catListComment">
<div class="divRecentCommentAticle">12</div>
<div class="divRecentCommentAticle">3</div>
</div></body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<SCRIPT type="text/javascript" src="js/jquery-1.4.2.min.js"></SCRIPT></head><body><div class="catListComment">
<div class="divRecentCommentAticle">12</div>
<div class="divRecentCommentAticle">3</div>
</div>
<SCRIPT type="text/javascript">
(function(){
alert($(".catListComment").html());
$(".catListComment").after('<div class=box-bottom>123</div>');
alert($(".catListComment").html());
})
(jQuery); </SCRIPT>
</body>
</html>
和谈操作。你的jquery语句是没有问题的。
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script type="text/javascript" src="js/jquery-1.2.6.min.js"></script>
<SCRIPT type="text/javascript">
$(document).ready(function(){
$(".catListComment").after('<div class=box-bottom>123</div>');
alert($(".catListComment"));
}); </SCRIPT>
</head><body><div class="catListComment">
<div class="divRecentCommentAticle">12</div>
<div class="divRecentCommentAticle">3</div>
</div></body>
</html>