<head>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
</head>
<body>
<div id="box">This is the original content.</div>
<button id="setHtmlBtn">Change HTML</button>
<script>
$(document).ready(function() {
$("#setHtmlBtn").click(function() {
$("#box").html("<b>New bold content!</b>");
});
});
</script>
</body>
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.