We would like to know how to append to Body after clicking.
<!--from w w w .j a v a2 s . c om-->
<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
src='http://code.jquery.com/jquery-1.8.3.js'></script>
<script type='text/javascript'>
$(function(){
$("body").on("click", "a, div", function(){
$("body").append("ping");
});
});
</script>
</head>
<body>
<a href="#">click me!</a>
<div>click me too!</div>
</body>
</html>
The code above is rendered as follows: