有只小跳蛙
如下代码可以实现:1234567891011121314<ul id="ul1"> <li class="cureent li_1"></li> <li class="cureent li_2"></li> <li class="cureent li_3"></li></ul><script src="jquery-1.9.1.min.js"></script><script>$(document).ready(function(){ $("#ul1 li").each(function(){ $(this).attr("class", $(this).attr("class") + "-2"); }); alert($("#ul1").html());});</script>