当前位置: 代码迷 >> JavaScript >> jquery之map使用有关问题
  详细解决方案

jquery之map使用有关问题

热度:95   发布时间:2012-06-04 14:48:03.0
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(",")
);
  相关解决方案