我正在使用 prepend() ,结果似乎有问题。
$('#element').prepend('<div><a href="http://google.com"><a href="http://test.com">Test.com</a> - A site</a></div>');
并且 html 结果(也使用 Firebug 查看)是错误的:
<div>
<a href="http://google.com"></a>
<a href="http://test.com">Test.com</a> - A site
</div>
(链接只是示例链接)