日期:2014-05-16 浏览次数:20396 次
<html>
<script type="text/javascript" src="/js/jquery-1.4.2.js" ></script>
<script language="javascript">
$("li").click(function(){
$(this).addClass("ndj");
}).mouseout(function(){
$(this).removeClass("ndj").addClass("ndj");
})</script>
<style>
/*切换按钮*/
li{ display:inline}
.ndj{ background:#000}
.wdj{ background:#FFF}
</style>
<li ><a href="#" >违章查询</a></li>
<li ><a href="#" >注意事项</a></li>
</html>
<!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>
<title></title>
<script src="../js/jquery-1.4.2.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$("li").click(function () {
$(this).attr("class", "ndj");
}).mouseout(function () {
$(this).attr("class", "wdj");
})
})
</script>
<style type="text/css">
/*切换按钮*/
li{ display:inline}
.ndj{ background:#000}
.wdj{ background:#FFF}
</style>
</head>
<body>
<ul>
<li><a href="#" >违章查询</a></li>
<li><a href="#" >注意事项</a></li>
</ul>
</body>
</html>