each()遍历
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>each()遍历</title>
<script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-3.3.1.min.js"></script>
</head>
<body>
<div>
<ul id="ul">
<li id="a">反对</li>
<li id="b">不v</li>
<li id="c">官方</li>
<li id="d">规范</li>
</ul>
</div>
<script>
$('li').each(function() {
var ids=this.id;
$(this).append('<em>'+ids+'</em>');
})
</script>
</body>
</html>