$(document).ready(function () {
$("#myButton").click(function () {
$("<b>replaceAll() replaces the existing content with new one</b><br/>").replaceAll("p");
});
});
<html>
<head>
<title>replaceAll</title>
</head>
<body>
<p>This is 20 Fingers and 2 Brains.</p>
<p>This is demo for replaceAll method.</p>
<p>Jquery is amazing.</p>
<input type="button" id="myButton" value="Replace All"/>
<input type="button" id="reset" value="Reset" onclick="location.reload()" />
</body>
</html>