<html>
<body>
<div
id
=
"test"
>
<p>
asdfasdfasdf
</p>
<p>
lkjhlkjhlkjh
</p>
<p>
fghjfghjfghj
</p>
</div>
<script type=
"text/javascript"
>
function
clean
(
obj
)
{
while
(
obj.
hasChildNodes
(
)
)
{
obj.
removeChild
(
obj.
childNodes
[
0
]
)
;
}
}
clean
(
document.
getElementById
(
'test'
)
)
;
</script>
</body>
</html>