我有一个文本,一个linebreak和一个图像里面的链接.
<a title="title" href="#" class="mail">info@domain.de
<br><img src="img/icons/icon.png">
</a>
Run Code Online (Sandbox Code Playgroud)
因此,为了在锚中使用所有内容,我使用:
$('.mail').html();
Run Code Online (Sandbox Code Playgroud)
现在我想要排除这个只是为了获得info@domain.de:
<br><img src="img/icons/icon.png">
Run Code Online (Sandbox Code Playgroud)
$('.mail').html();Run Code Online (Sandbox Code Playgroud)
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<a title="title" href="#" class="mail">info@domain.de
<br><img src="img/icons/icon.png">
</a>Run Code Online (Sandbox Code Playgroud)
我该怎么做?