<!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>
<title></title>
<script src="js/jquery.js" type="text/javascript"></script>
<script src="js/output.js" type="text/javascript"></script>
</head>
<body id="d" ><span></span>
<p></p>
<button>shanchu</button>
</body>
</html>
--------------------------------------------------------------------
$(document).ready(function () {
$("button").click(function () {
$("p").empty();
$("span:first").text("删除之后共有 " +$("p").length + " 个p元素");
});
});