【发布时间】:2010-06-29 17:49:31
【问题描述】:
我正在使用 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>
(链接只是示例链接)
【问题讨论】:
-
你不能建立一个指向 2 个位置的链接。