jquery怎么获取整个<DIV>...</DIV>包涵中的所有代码

比如:获取红色部分<div id="test" style="background-color:red;100px; height:100px;"><h2 style="color:white;">Test</h2></div> 


<html>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
//alert($(document.body).html());//获取包括div的内容
alert($("#test").html()); //仅获取div下级内容
});
</script>
<body>
<div id="test" style="background-color:red;100px; height:100px;"><h2 style="color:white;">Test</h2></div>
</body>
</html>