<script src="jquery-2/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
//也可以用$(function(){})
//得到jquery对象
var $te1=$("#t4");
//显示出来
alert($te1.html());
var t2=document.getElementById("t2");
alert(t2.innerHTML);
//转doucment
var te11=$te1.get(0);
alert(te11.innerHTML);
//转jquery
var $tt2=$(t2);
alert($tt2.html());
});
</script>
<body>
<div id="tt">
<h1 id="t1" name="t1">1</h1>
<h1 id="t2">22</h1>
<h1 id="t3">333</h1>
<h1 id="t4" name="nn">4444</h1>
</div>
</body>