jquery选择器-基本选择器
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>test</title>
<meta name="description" content=""/>
<meta name="keywords" content=""/>
<script type="text/javascript" charset="utf-8" src="./jquery-1.7.2.min.js"></script>
<style>
??? .classFrame {width:300px;border:1px}
??? .classFrame div,span {display:none}
??? .clsContent{background-color: #FF0000}
</style>
<script>
//??? $(function(){//根据id选择
//??? ??? $('#clsOne').css('display','block');
//??? });
//??? $(function (){//根据标签名选择
//??? ??? ??? $('div span').css('display', 'block');
//??? });
//??? $(function(){//根据类选择
//??? ??? $('.classFrame .clsContent').css('display', 'block');???
//??? });
//??? $(function(){//选择所有,测试结构是会把title,script,style标签下的内容也显示出来
//??? ??? $('*').css('display', 'block');???
//??? });
??? $(function(){//id和标签名组合选择
??? ??? $('#clsOne,span').css('display', 'block');???
??? });
</script>
</head>
<body>
??? <div class="classFrame">
??? ??? ??? <div id="clsOne">标题</div>
??? ??? ? <div class="clsContent">内容</div>
??? ??? ? <span>span</span>
??? ??? ? <span>span2</span>
??? </div>
</body>
</html>