Try It Editor
Tip: Press
Ctrl/⌘ + Enter
to Run
▶ Run
Reset
Copy
Download
Code
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>DOM Manipulation</title> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> </head> <body> <p id="text">Original</p> <button id="change">Change Text</button> <script> $("#change").click(function(){ $("#text").text("Changed with jQuery!"); }); </script> </body> </html>
Output