jQuery Remove Elements
<!DOCTYPE html> <html> <head> <script src="https://code.jquery.com/jquery-3.7.1.min.js"></script> </head> <body> <div id="notice">This is a notice message.</div> <button id="deleteBtn">Delete</button> <script> $("#deleteBtn").click(function () { $("#notice").remove(); }); </script> </body> </html>