【发布时间】:2015-12-26 20:44:50
【问题描述】:
我有很多 HTML 页面,我想将段落的一些单词转换为链接。
例如:
string paragraph="Bookselling is the commercial trading of books, the retail and distribution end of the publishing process. The modern system of bookselling dates from soon after the introduction of printing. Compare retail prices & arrival times on your books - all in one place. Select which books you want - used, digital, or rental"
string []Linkwords=new string[]{"books","Bookselling"};
我不知道我必须做什么,但这是我将其替换为链接的代码...
1- Sorting Linkwords ...
2- paragraph=paragraph.Replace(Linkwords[i],"<a href=\"#\">"+Linkwords[i]+"</a>");
它没有给出正确的答案
<a htef="#"><a htef="#">books</a>elling</a> is the commercial trading of <a htef="#">Books</a>
有没有现成的功能或者类似的东西。谢谢
【问题讨论】: