(PCC)::[how-to-use-JavaScript-in-body-tag-and-run-program-with-proper-output]::[js]
<!DOCTYPE html> <html> <body> <h2>JavaScript in Body</h2> <p id="demo">A Paragraph.</p> <button type="button" onclick="myFunction()">Try it</button> <script> function myFunction() { document.getElementById("demo").innerHTML = "Paragraph changed."; } </script> </body> </html>
A Paragraph.