62,046
社区成员
发帖
与我相关
我的任务
分享
string txt = "<a href=\"#\" style=\"color:black;\" onmouseover=\"this.style.color='red'\" onmouseout=\"this.style.color='black'\" onclick=\"window.location.href='http://www.a.com'\">open a</a>";
a.InnerHtml = txt;
<style>
a {
color: black;
}
a:hover {
color: red;
}
</style>