<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<script class="lazyload" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC" data-original="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js" type="text/javascript"></script>
<script>
function aaa(){
$(".a li[class='a']").append("hello");
//注:如果是要class不等于a的,为$(".a li[class!='a']").append("hello");
}
</script>
</head>
<body>
<input type="button" onclick="aaa()" value="添加文本">
<table>
<ul class="a">
<li class="b" ></li>
<li class="a" ></li>
<li class="a" ></li>
<li class="b" ></li>
<li class="c" ></li>
</ul>
</table>
</body>
</html>
共同学习,写下你的评论
评论加载中...
作者其他优质文章