2015-10-14 80 views

回答

0

您可以使用此

$("#copy").append($("#text").text());
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> 
 
<span id="text">Copy me</span> 
 
<span id="copy"></span>

0

$('#copy').html($('#text').text());
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> 
 
<span id="text">Copy me</span> 
 
<span id="copy"></span>

0

$('#copy').text($('#text').text());
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> 
 
<span id="text">Copy me</span> 
 
<span id="copy"></span>

相關問題