日期:2014-05-16  浏览次数:20439 次

jquery之map使用问题
<body>
<div id="ff">
<p id="f">click me</p>
<p id="s">content</p>
</div>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$("#s").html(
$("p").map(function(n,i){
return $(n).text( );
}).get( ).join(",");
);
</script>
 </body>

这段代码哪出问题啦??`````````求解

------解决方案--------------------
这个好说,先看一下基础教材
------解决方案--------------------
$("#s").html(
$("p").map(function(){
return $(this).text( );
}).get( ).join(",")
);