2019-04-30遍历
程序员文章站
2022-07-13 12:47:01
...
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<script src="../js/jquery.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
$(function(){
$('li').each(function(i,elem){
// console.log(i);
console.log($(elem).html());
})
})
</script>
</head>
<body>
<ul>
<li>1111111111</li>
<li>1111111111</li>
<li>1111111111</li>
<li>1111111111</li>
<li>1111111111</li>
<li>1111111111</li>
</ul>
</body>
</html>