<span class="get" attr-one="1" attr-two="2">text1</span>
<span class="get" attr-one="21" attr-two="2">text2</span>
<span class="get" attr-one="31" attr-four="2">text3</span>
<span class="get" attr-one="4" attr-three="2">tex4t</span>
<span class="get" attr-one="15" attr-five="2">text5</span>
<div id="container" style="width: 200px; height: 200px; background-color: red"></div>
$('.get').click(function(){
$('#container').append($(this).html());
})
如何獲取當前對象與HTML添加將他追加到其他容器?在我的例子中,這隻從我的範圍獲得內容。我想獲得與atrributes等從jquery獲得全部html的範圍
看到http://jsfiddle.net/riturajratan/bvth3/3/ –