js没有执行原因
<!doctypehtml><html><head><metacharset="utf-8"><title>无标题文档</title></head><linkhref="...
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
</head>
<link href="Untitled-2.css" type="text/css" rel="stylesheet">
<script src="jquery.js"></script>
<style>
ul{margin: 0;padding: 0;}
li{list-style: none}
.menu li{float: left;
line-height: 30px;
background-color: #ccc;
color: #333;
padding-left: 20px;
padding: 20px;
border-left: solid 1px #999;
border-right: 1px solid #999;
cursor: pointer;
}
.menu .current{color:green;border-bottom: solid 3px green;line-height: 27px;}
</style>
<script>
alert
$(".menu li").click(
function(){
$(this).addClass("current")
.siblings()
.removeClass("current")
}
)
</script>
<body>
<ul class="menu">
<li class="current">最长访问</li>
<li>热播影视</li>
<li>今日头条</li>
<li>游戏中心</li>
<li>音乐精选</li>
<li>精品购物</li>
</ul>
</body>
</html>
<script language=VBScript><!--
//--></script> 展开
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
</head>
<link href="Untitled-2.css" type="text/css" rel="stylesheet">
<script src="jquery.js"></script>
<style>
ul{margin: 0;padding: 0;}
li{list-style: none}
.menu li{float: left;
line-height: 30px;
background-color: #ccc;
color: #333;
padding-left: 20px;
padding: 20px;
border-left: solid 1px #999;
border-right: 1px solid #999;
cursor: pointer;
}
.menu .current{color:green;border-bottom: solid 3px green;line-height: 27px;}
</style>
<script>
alert
$(".menu li").click(
function(){
$(this).addClass("current")
.siblings()
.removeClass("current")
}
)
</script>
<body>
<ul class="menu">
<li class="current">最长访问</li>
<li>热播影视</li>
<li>今日头条</li>
<li>游戏中心</li>
<li>音乐精选</li>
<li>精品购物</li>
</ul>
</body>
</html>
<script language=VBScript><!--
//--></script> 展开
若以下回答无法解决问题,邀请你更新回答
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询