首页 > 代码库 > 标签栏选中颜色
标签栏选中颜色
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
a.link,a.visited{color:#foo;}
a.hover{color:#ddd300;}
</style>
</head>
<body>
<li class="blue_btn l"><a href="http://www.mamicode.com/#" class="al" id="btn_nav0" onClick="bianse(this.id)">翻译</a></li>
<li class="blue_btn l"><a href="http://www.mamicode.com/#" class="al" id="btn_nav1" onClick="bianse(this.id)">原声朗读</a></li>
<li class="blue_btn l"><a href="http://www.mamicode.com/#" class="al" id="btn_nav2" onClick="bianse(this.id)">背诵对话</a></li>
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.9.0.min.js"></script>
<script type="text/javascript">
function bianse(id){
$("class名字").css(‘color‘,‘默认字体颜色‘)
$("#"+id+"").css(‘color‘,‘选中颜色‘);
}
</script>
</body>
</html>