以下是链接选项卡的代码,
HTML
<div class="sortLinks right">
<label>Sort by</label>
<a onclick="javascript:SortOrder('DATE')" href="#">Date Modified</a>
<span class="sort_sep"> </span>
<a onclick="javascript:SortOrder('ALPHA')" href="#">Alphabetical</a>
</div>
CSS
a:focus
{
color:Blue;
}
jQuery
function SortOrder(order) {
$.ajax({
type: "POST",
cache: false,
url: "@Url.Action("SecondarySkillDetails", "SkillLifeCycle")",
data: { primarySkillID: $("#ddlPrimarySkills").val(), sortorder: order },
success: function (data) {
$("#content").html(data);
},
error: function (xhr, textStatus, error) {
alert (error);
}
});
}
我想以蓝色突出显示活动链接。在选择链接时,它以蓝色突出显示,当我点击外部时,它再次变为黑色。我怎样才能避免这种情况?