Edit: This question doesn't make sense, and my actual problem was that I had an tag inside another tag.
I'm in a scenario where it seems like I cannot use tags for links. Is there any JavaScript alternative, that functions the same way?
I have a string of text, and I have parts of that string which I want to have as links. This string has a fixed width of 200px, and needs the CSS overflow: ellipsis
(Thus it should not wrap)
答案 0 :(得分:0)
这是您创建链接的方式。
<p>
So here we got <a href="#">Link1</a> and <a href="#">Link2</a>!
</p>
建议更改: