2个回答
展开全部
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title>首页</title>
<script src="
<script type="text/javascript">
$(document).ready(function(){
$('.list li').each(function(){
alert($(this).text());
});
});
</script>
</head>
<body>
<ul class="list">
<li>A</li>
<li>B</li>
<li>C</li>
<li>D</li>
</ul>
</div>
</body>
</html>
直接贴代码啦,主要用jquery里面的each()函数;
展开全部
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title>首页</title>
<script src="
<script type="text/javascript">
$(document).ready(function(){
$('.list li').each(function(){
alert($(this).text());
});
});
</script>
</head>
<body>
<ul class="list">
<li>A</li>
<li>B</li>
<li>C</li>
<li>D</li>
</ul>
</div>
</body>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title>首页</title>
<script src="
<script type="text/javascript">
$(document).ready(function(){
$('.list li').each(function(){
alert($(this).text());
});
});
</script>
</head>
<body>
<ul class="list">
<li>A</li>
<li>B</li>
<li>C</li>
<li>D</li>
</ul>
</div>
</body>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title>首页</title>
<script src="
<script type="text/javascript">
$(document).ready(function(){
$('.list li').each(function(){
alert($(this).text());
});
});
</script>
</head>
<body>
<ul class="list">
<li>A</li>
<li>B</li>
<li>C</li>
<li>D</li>
</ul>
</div>
</body>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title>首页</title>
<script src="
<script type="text/javascript">
$(document).ready(function(){
$('.list li').each(function(){
alert($(this).text());
});
});
</script>
</head>
<body>
<ul class="list">
<li>A</li>
<li>B</li>
<li>C</li>
<li>D</li>
</ul>
</div>
</body>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询