<script type="text/javascript"> $("<span>123</span>").replaceAll("<span>111</span>"); </script> <span>123</span>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.2.min.js"></script> <script type="text/javascript"> $(function() { $('#span').replaceWith('<span>111</span>'); }); </script> <span id="span">123</span>